aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/auth/test_roles.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-01-18 14:59:35 +0300
committerFrederick Muriuki Muriithi2023-01-18 14:59:35 +0300
commit4cc328ef78c7b8108d7623fdd4fcae5294317f2e (patch)
tree5fff59d3a57bb6e0ec044373f205ed4503d8b47a /tests/unit/auth/test_roles.py
parente97703817628e6b781c5b883ed3aa7fbf9967628 (diff)
downloadgenenetwork3-4cc328ef78c7b8108d7623fdd4fcae5294317f2e.tar.gz
auth: Fix tests after enforcing FOREIGN KEY constraint
Fix a number of tests and fixtures that were not conforming to the FOREIGN KEY constraints: * Each test that creates a new "object" needs to clean up after itself * Each fixture that sets up test data needs to clean up after itself
Diffstat (limited to 'tests/unit/auth/test_roles.py')
-rw-r--r--tests/unit/auth/test_roles.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/auth/test_roles.py b/tests/unit/auth/test_roles.py
index 56ad39e..bee03fc 100644
--- a/tests/unit/auth/test_roles.py
+++ b/tests/unit/auth/test_roles.py
@@ -99,4 +99,5 @@ def test_user_roles(fxtr_group_user_roles, user, expected):
WHEN: we request the user's privileges
THEN: return **ALL** the privileges attached to the user
"""
- assert user_roles(fxtr_group_user_roles, user) == expected
+ conn, *_others = fxtr_group_user_roles
+ assert user_roles(conn, user) == expected