aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/users
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-05-31 17:27:13 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-05-31 17:27:13 +0100
commitcc897d624d091c679ef304df9ff35f1093ae1ac0 (patch)
treecedc3f5b0f494104ea6399a63768e570d735c6e1 /ctrack/users
parent656ceb510d535d0592cda7cc92bbe0e43561ea0c (diff)
created a group fixture with perms
This fixture is a group with all permissions relating to ctrack system so far.
Diffstat (limited to 'ctrack/users')
-rw-r--r--ctrack/users/tests/test_credentials.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ctrack/users/tests/test_credentials.py b/ctrack/users/tests/test_credentials.py
index 496eeaf..759d8cb 100644
--- a/ctrack/users/tests/test_credentials.py
+++ b/ctrack/users/tests/test_credentials.py
@@ -32,6 +32,11 @@ def test_there_is_a_cct_user_group(db): # adding fixture here
assert group in user.groups.all()
+def test_user_fixture_has_access_to_all_ctrack_models(db, cct_user_group):
+ view_org_perm = Permission.objects.get(codename="view_organisation")
+ assert view_org_perm in cct_user_group.permissions.all()
+
+
# def test_should_create_user(user_A: get_user_model()) -> None:
# assert user_A.username == "A"