aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'ctrack/conftest.py')
-rw-r--r--ctrack/conftest.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ctrack/conftest.py b/ctrack/conftest.py
index a3c6f58..b0a5bce 100644
--- a/ctrack/conftest.py
+++ b/ctrack/conftest.py
@@ -110,6 +110,13 @@ def user() -> User:
@pytest.fixture
+def cct_user(cct_user_group) -> User:
+ # For testing views which require redirects to permission-controlled
+ # pages, we have to ensure our test user is has the requisite permissions here
+ return UserFactory(groups=[cct_user_group])
+
+
+@pytest.fixture
def person(user, submode, org_with_people):
org = org_with_people
role = RoleFactory.create(name="Compliance Inspector")