From 9f92d6a6ccdd8927a1cdf94a8d8cc2ccc033f45d Mon Sep 17 00:00:00 2001 From: Tore Brede <Tore.Brede@uib.no> Date: Fri, 6 Aug 2021 15:39:59 +0200 Subject: [PATCH] GREG-10: Removing test that is no longer valid --- greg/tests/models/test_person.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/greg/tests/models/test_person.py b/greg/tests/models/test_person.py index fb851f06..f4aeba58 100644 --- a/greg/tests/models/test_person.py +++ b/greg/tests/models/test_person.py @@ -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() -- GitLab