Skip to content

Commit

Permalink
fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonvt committed Nov 17, 2023
1 parent 223221e commit 5e269af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cognite/client/_api/iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def compare_capabilities(
for key, check_grp in to_check_lookup.items():
group = has_capabilties_lookup.get(key, set())
if any(AllScope._scope_name == grp[2] for grp in group):
continue # If allScope exists for capability, we safely skip ahead:
continue # If allScope exists for capability, we safely skip ahead
elif RawAcl._capability_name == next(iter(check_grp))[0]:
raw_group.update(group)
raw_check_grp.update(check_grp)
Expand Down
7 changes: 3 additions & 4 deletions tests/tests_unit/test_data_classes/test_capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,9 @@ def test_raw_acl_database_scope(self, cognite_client, extra_existing):
if extra_existing:
assert missing == [RawAcl([RawAcl.Action.Write], RawAcl.Scope.Table({"db1": ["t1"]}))]
else:
assert missing == [
RawAcl([RawAcl.Action.Read], RawAcl.Scope.Table({"db1": ["t3"]})),
RawAcl([RawAcl.Action.Write], RawAcl.Scope.Table({"db1": ["t1"]})),
]
assert len(missing) == 2
assert RawAcl([RawAcl.Action.Read], RawAcl.Scope.Table({"db1": ["t3"]})) in missing
assert RawAcl([RawAcl.Action.Write], RawAcl.Scope.Table({"db1": ["t1"]})) in missing


@pytest.mark.parametrize(
Expand Down

0 comments on commit 5e269af

Please sign in to comment.