aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-12-12 13:29:45 +0300
committerFrederick Muriuki Muriithi2022-12-12 13:29:45 +0300
commit56b54da6fc6e97d5d6dac70f2393dcc98d93991c (patch)
treee58fc122b169fa56898ac4e352407060d8c64df4 /tests
parent6c077671e9afdb4921e72d0a3018e3d8dedada8b (diff)
downloadgenenetwork3-56b54da6fc6e97d5d6dac70f2393dcc98d93991c.tar.gz
auth: pass cursor object to `user_group` function
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/auth/test_groups.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unit/auth/test_groups.py b/tests/unit/auth/test_groups.py
index e1b44cc..5a27c71 100644
--- a/tests/unit/auth/test_groups.py
+++ b/tests/unit/auth/test_groups.py
@@ -117,4 +117,7 @@ def test_user_group(test_users_in_group, user, expected):
Nothing
"""
conn, _group, _users = test_users_in_group
- assert user_group(conn, user).maybe(Nothing, lambda val: val) == expected
+ with db.cursor(conn) as cursor:
+ assert (
+ user_group(cursor, user).maybe(Nothing, lambda val: val)
+ == expected)