Skip to content

Commit

Permalink
Fix type during test
Browse files Browse the repository at this point in the history
  • Loading branch information
illusional committed Oct 22, 2023
1 parent 60ce6ed commit 72c8db9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion db/python/tables/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ async def check_which_groups_member_is_missing(
_query, {'group_ids': group_ids, 'member': member}
)
membered_group_ids = set(r['gid'] for r in results)
return set(group_ids) - membered_group_ids
return group_ids - membered_group_ids

async def create_group(self, name: str) -> int:
"""Create a new group"""
Expand Down
4 changes: 2 additions & 2 deletions test/test_project_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def test_check_which_groups_member_is_missing(self):
group = str(uuid.uuid4())
gid = await self.pttable.gtable.create_group(group)
missing_gids = await self.pttable.gtable.check_which_groups_member_is_missing(
[gid], self.author
{gid}, self.author
)

self.assertEqual(1, len(missing_gids))
Expand All @@ -116,7 +116,7 @@ async def test_check_which_groups_member_is_missing_none(self):
gid = await self.pttable.gtable.create_group(group)
await self.pttable.gtable.set_group_members(gid, [self.author], self.author)
missing_gids = await self.pttable.gtable.check_which_groups_member_is_missing(
[gid], self.author
{gid}, self.author
)

self.assertEqual(0, len(missing_gids))
Expand Down

0 comments on commit 72c8db9

Please sign in to comment.