From c0f5b9d646487e035f2d2e5370041b317b81baf6 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 20 Jun 2024 15:34:02 -0500 Subject: Reorganise test fixtures. Fix tests and issues caught. Reorganise test fixtures to more closely follow the design of the auth system. Fix the broken tests due to refactors and fix all issues caught by the running tests. --- gn_auth/auth/authorisation/resources/groups/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gn_auth/auth/authorisation/resources/groups') diff --git a/gn_auth/auth/authorisation/resources/groups/models.py b/gn_auth/auth/authorisation/resources/groups/models.py index 03a93b6..ee77654 100644 --- a/gn_auth/auth/authorisation/resources/groups/models.py +++ b/gn_auth/auth/authorisation/resources/groups/models.py @@ -72,7 +72,7 @@ def user_membership(conn: db.DbConnection, user: User) -> Sequence[Group]: "WHERE group_users.user_id=?") with db.cursor(conn) as cursor: cursor.execute(query, (str(user.user_id),)) - groups = tuple(Group(row[0], row[1], json.loads(row[2])) + groups = tuple(Group(row[0], row[1], json.loads(row[2] or "{}")) for row in cursor.fetchall()) return groups -- cgit v1.2.3