From 80a820d359df12193e04d438a445fa10c49930e5 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 19 Feb 2019 18:46:05 +0100 Subject: Fix admin account test: admin status is now available for non superuser --- ishtar_common/tests.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'ishtar_common/tests.py') diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index f51f9736a..8ecf98255 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -524,9 +524,14 @@ class AccessControlTest(TestCase): models.UserProfile.objects.filter( person__ishtaruser=ishtar_user, profile_type__txt_idx='administrator' - ).count(), 0 + ).count(), 1 + ) # no more automatic deletion of profile for admin + self.assertEqual( + models.UserProfile.objects.filter( + person__ishtaruser=ishtar_user, + profile_type__txt_idx='administrator' + ).count(), 1 ) - self.assertNotIn(admin, ishtar_user.person.person_types.all()) class UserProfileTest(TestCase): -- cgit v1.2.3