♻️(models) refactor user email fields

The email field on the user is renamed to "admin_email" for clarity. The
"email" and "name" fields of user's main identity are made available on
the user model so it is easier to access it.
This commit is contained in:
Samuel Paccoud - DINUM
2024-03-25 23:56:32 +01:00
committed by Marie
parent 6d807113bc
commit 7ea6342a01
12 changed files with 113 additions and 83 deletions

View File

@@ -31,3 +31,14 @@ def test_commands_create_demo():
assert models.Identity.objects.exists()
assert models.Team.objects.count() == 3
assert models.TeamAccess.objects.count() >= 3
def test_commands_createsuperuser():
"""
The createsuperuser management command should create an use
with superuser permissions.
"""
call_command("createsuperuser")
assert models.User.objects.count() == 1