increase coverage on owners model

This commit is contained in:
Matthias 2022-05-03 20:26:49 +02:00
parent 05d2d3664c
commit 300558adb0
No known key found for this signature in database
GPG Key ID: AB6D0E6C4CB65093

View File

@ -197,6 +197,10 @@ class OwnerModelTest(TestCase):
self.assertTrue(user_as_owner in related_owners)
self.assertTrue(group_as_owner in related_owners)
# Check owner matching
owners = Owner.get_owners_matching_user(self.user)
self.assertEqual(owners, [user_as_owner, group_as_owner])
# Delete user and verify owner was deleted too
self.user.delete()
user_as_owner = Owner.get_owner(self.user)