Unit test user app

* adds unit test for User model and forms
* refactors functions from user_checks.py into User class and drops user_checks.py
This commit is contained in:
2023-09-13 09:49:40 +02:00
parent 19baf7ba86
commit 9117abd1d8
14 changed files with 263 additions and 70 deletions

View File

@@ -640,12 +640,11 @@ class ShareableObjectMixin(models.Model):
Returns:
"""
from konova.utils.user_checks import is_default_group_only
users = self.shared_users
cleaned_users = []
default_users = []
for user in users:
if not is_default_group_only(user):
if not user.is_default_group_only():
cleaned_users.append(user)
else:
default_users.append(user)