diff --git a/posthog/rbac/test/test_user_access_control.py b/posthog/rbac/test/test_user_access_control.py index d398f246589a5..d17de05dd7b44 100644 --- a/posthog/rbac/test/test_user_access_control.py +++ b/posthog/rbac/test/test_user_access_control.py @@ -281,7 +281,9 @@ def test_filters_project_queryset_based_on_acs_always_allows_org_admin(self): filtered_teams = list( self.user_access_control.filter_queryset_by_access_level(Team.objects.all(), include_all_if_admin=True) ) - assert filtered_teams == [self.team, team2, team3] + assert sorted(filtered_teams, key=lambda team: team.id) == sorted( + [self.team, team2, team3], key=lambda team: team.id + ) def test_organization_access_control(self): # A team isn't always available like for organization level routing