|
|
@ -790,6 +790,10 @@ def test_clients(admin: KeycloakAdmin, realm: str): |
|
|
|
assert res["name"] == "test-resource", res |
|
|
|
test_resource_id = res["_id"] |
|
|
|
|
|
|
|
res = admin.get_client_authz_resource(client_id=auth_client_id, resource_id=test_resource_id) |
|
|
|
assert res["_id"] == test_resource_id, res |
|
|
|
assert res["name"] == "test-resource", res |
|
|
|
|
|
|
|
with pytest.raises(KeycloakPostError) as err: |
|
|
|
admin.create_client_authz_resource( |
|
|
|
client_id=auth_client_id, payload={"name": "test-resource"} |
|
|
@ -809,6 +813,9 @@ def test_clients(admin: KeycloakAdmin, realm: str): |
|
|
|
assert res["name"] == "temp-resource", res |
|
|
|
temp_resource_id = res["_id"] |
|
|
|
admin.delete_client_authz_resource(client_id=auth_client_id, resource_id=temp_resource_id) |
|
|
|
with pytest.raises(KeycloakGetError) as err: |
|
|
|
admin.get_client_authz_resource(client_id=auth_client_id, resource_id=temp_resource_id) |
|
|
|
assert err.match("404: b''") |
|
|
|
|
|
|
|
# Authz policies |
|
|
|
res = admin.get_client_authz_policies(client_id=auth_client_id) |
|
|
|