Skip to content

Commit

Permalink
Use sets for assertions as order does not matter
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed May 6, 2024
1 parent 3fe718c commit 90da378
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/tests_deployment/test_jupyterhub_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_jupyterhub_loads_roles_from_keycloak():
verify=False,
)
user = response.json()
assert user["roles"] == [
assert set(user["roles"]) == {
"user",
"manage-account",
"jupyterhub_developer",
Expand All @@ -26,7 +26,7 @@ def test_jupyterhub_loads_roles_from_keycloak():
"grafana_developer",
"manage-account-links",
"view-profile",
]
}


@pytest.mark.filterwarnings("ignore::urllib3.exceptions.InsecureRequestWarning")
Expand All @@ -39,4 +39,4 @@ def test_jupyterhub_loads_groups_from_keycloak():
verify=False,
)
user = response.json()
assert user["groups"] == ["/analyst", "/developer", "/users"]
assert set(user["groups"]) == {"/analyst", "/developer", "/users"}

0 comments on commit 90da378

Please sign in to comment.