aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/users/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ctrack/users/tests')
-rw-r--r--ctrack/users/tests/test_credentials.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/ctrack/users/tests/test_credentials.py b/ctrack/users/tests/test_credentials.py
index 7538643..a63ffe0 100644
--- a/ctrack/users/tests/test_credentials.py
+++ b/ctrack/users/tests/test_credentials.py
@@ -22,9 +22,17 @@ def user_A(db) -> Group:
return user
-def test_should_create_user(user_A: get_user_model()) -> None:
- assert user_A.username == "A"
+def test_there_is_a_cct_user_group(db):
+ group = Group.objects.create(name="cct_user")
+ assert Group.objects.get(name="cct_user")
+ user = get_user_model().objects.create_user("INSPECTOR")
+ user.groups.add(group)
+ assert group in user.groups.all()
+
+
+# def test_should_create_user(user_A: get_user_model()) -> None:
+# assert user_A.username == "A"
-def test_user_is_in_app_user_group(user_A: get_user_model()) -> None:
- assert user_A.groups.filter(name="cct_user").exists()
+# def test_user_is_in_app_user_group(user_A: get_user_model()) -> None:
+# assert user_A.groups.filter(name="cct_user").exists()