From 3548e1e8ecbbe1cdda7895418fac205c1d6a509b Mon Sep 17 00:00:00 2001 From: Richard Nemeth Date: Sat, 14 Dec 2024 16:12:02 +0100 Subject: [PATCH] test: simplify assertion for non-existent group path error --- tests/test_keycloak_admin.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/test_keycloak_admin.py b/tests/test_keycloak_admin.py index 68b2be1..04179a8 100644 --- a/tests/test_keycloak_admin.py +++ b/tests/test_keycloak_admin.py @@ -846,11 +846,7 @@ def test_groups(admin: KeycloakAdmin, user: str): assert res["id"] == subgroup_id_1, res 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") assert res is not None, res