Skip to content

Commit

Permalink
Fix a flakey functest
Browse files Browse the repository at this point in the history
  • Loading branch information
seanh committed Nov 27, 2024
1 parent 751be6c commit 1633fc7
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions tests/functional/api/groups/members_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,27 @@ def test_it_returns_list_of_members_if_user_has_access_to_private_group(
)

assert res.status_code == 200
assert res.json == [
{
"authority": group.authority,
"userid": user.userid,
"username": user.username,
"display_name": user.display_name,
"roles": [GroupMembershipRoles.MEMBER],
"actions": ["delete"],
},
{
"authority": group.authority,
"userid": other_user.userid,
"username": other_user.username,
"display_name": other_user.display_name,
"roles": [GroupMembershipRoles.MEMBER],
"actions": [],
},
]
assert res.json == sorted(
[
{
"authority": group.authority,
"userid": user.userid,
"username": user.username,
"display_name": user.display_name,
"roles": [GroupMembershipRoles.MEMBER],
"actions": ["delete"],
},
{
"authority": group.authority,
"userid": other_user.userid,
"username": other_user.username,
"display_name": other_user.display_name,
"roles": [GroupMembershipRoles.MEMBER],
"actions": [],
},
],
key=lambda membership: membership["username"],
)

def test_it_returns_404_if_user_does_not_have_read_access_to_group(
self, app, db_session, factories
Expand Down

0 comments on commit 1633fc7

Please sign in to comment.