aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/conftest.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-14 12:17:58 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-14 12:17:58 +0100
commitbc4edc69407f20da32a48d534b3d725cc3818c1a (patch)
treed9dfbcf426320e59c8e30f36fc930409e2ce33ff /ctrack/conftest.py
parente4e8853798a0f5e281225ca6e502159cb577a181 (diff)
all unit tests pass after configuring user fixture to have perms to visit redirect pages
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")