From bc4edc69407f20da32a48d534b3d725cc3818c1a Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 14 Oct 2020 12:17:58 +0100 Subject: all unit tests pass after configuring user fixture to have perms to visit redirect pages --- ctrack/conftest.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ctrack/conftest.py') diff --git a/ctrack/conftest.py b/ctrack/conftest.py index a3c6f58..b0a5bce 100644 --- a/ctrack/conftest.py +++ b/ctrack/conftest.py @@ -109,6 +109,13 @@ def user() -> User: return UserFactory() +@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 -- cgit v1.2.3