Browse Source

test: simplify assertion for non-existent group path error

pull/627/head
Richard Nemeth 1 week ago
parent
commit
3548e1e8ec
No known key found for this signature in database GPG Key ID: 21C39470DF3DEC39
  1. 6
      tests/test_keycloak_admin.py

6
tests/test_keycloak_admin.py

@ -846,11 +846,7 @@ def test_groups(admin: KeycloakAdmin, user: str):
assert res["id"] == subgroup_id_1, res assert res["id"] == subgroup_id_1, res
res = admin.get_group_by_path(path="/main-group/subgroup-2/subsubgroup-1/test") res = admin.get_group_by_path(path="/main-group/subgroup-2/subsubgroup-1/test")
assert res == {
"error": "Group path does not exist",
"error_description": "For more on this error consult the server log at the "
"debug level.",
}, res
assert res["error"] == "Group path does not exist"
res = admin.get_group_by_path(path="/main-group/subgroup-2/subsubgroup-1") res = admin.get_group_by_path(path="/main-group/subgroup-2/subsubgroup-1")
assert res is not None, res assert res is not None, res

Loading…
Cancel
Save