Skip to content
Snippets Groups Projects
Commit 9f92d6a6 authored by Tore.Brede's avatar Tore.Brede
Browse files

GREG-10: Removing test that is no longer valid

parent 3c0672b3
No related branches found
No related tags found
1 merge request!19GREG-10: Adding cascading deletes for persons
Pipeline #89080 passed
......@@ -2,8 +2,6 @@ from functools import partial
import pytest
from django.db.models import ProtectedError
from greg.models import (
OrganizationalUnit,
Person,
......@@ -12,7 +10,6 @@ from greg.models import (
Sponsor,
)
person_role_with = partial(
PersonRole.objects.create,
start_date="2020-03-05",
......@@ -65,12 +62,3 @@ def test_add_multiple_roles_to_person(person, role_foo, role_bar):
assert len(person_roles) == 2
assert role_foo in person_roles
assert role_bar in person_roles
@pytest.mark.django_db
def test_delete_person_with_roles(person):
# it is not clear what cleanup needs to be done when removing a person,
# so for now it is prohibited to delete a person with role relationships
# attached in other tables
with pytest.raises(ProtectedError):
person.delete()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment