|
|
@ -3066,6 +3066,7 @@ def test_refresh_token(admin: KeycloakAdmin): |
|
|
|
|
|
|
|
# async function start |
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.asyncio |
|
|
|
async def test_a_realms(admin: KeycloakAdmin): |
|
|
|
"""Test realms. |
|
|
@ -3456,7 +3457,9 @@ async def test_a_user_groups_pagination(admin: KeycloakAdmin, realm: str): |
|
|
|
groups = await admin.a_get_user_groups(user_id=user_id) |
|
|
|
assert len(groups) == admin.PAGE_SIZE + 50, len(groups) |
|
|
|
|
|
|
|
groups = await admin.a_get_user_groups(user_id=user_id, query={"first": 100, "max": -1, "search": ""}) |
|
|
|
groups = await admin.a_get_user_groups( |
|
|
|
user_id=user_id, query={"first": 100, "max": -1, "search": ""} |
|
|
|
) |
|
|
|
assert len(groups) == 50, len(groups) |
|
|
|
|
|
|
|
groups = await admin.a_get_user_groups( |
|
|
@ -5439,10 +5442,9 @@ async def test_a_client_scopes(admin: KeycloakAdmin, realm: str): |
|
|
|
client_scope_id=res, protocol_mapper_id=test_mapper["id"], payload=test_mapper |
|
|
|
) |
|
|
|
assert res_update == dict() |
|
|
|
assert ((await admin.a_get_mappers_from_client_scope(client_scope_id=res))[0]["config"][ |
|
|
|
assert (await admin.a_get_mappers_from_client_scope(client_scope_id=res))[0]["config"][ |
|
|
|
"user.attribute" |
|
|
|
] == "test" |
|
|
|
) |
|
|
|
|
|
|
|
# Test delete mapper |
|
|
|
res_del = await admin.a_delete_mapper_from_client_scope( |
|
|
@ -5575,7 +5577,7 @@ async def test_a_keys(admin: KeycloakAdmin, realm: str): |
|
|
|
"AES", |
|
|
|
"HS256", |
|
|
|
"RS256", |
|
|
|
"RSA-OAEP" |
|
|
|
"RSA-OAEP", |
|
|
|
} or set((await admin.a_get_keys())["active"].keys()) == {"RSA-OAEP", "RS256", "HS512", "AES"} |
|
|
|
assert {k["algorithm"] for k in (await admin.a_get_keys())["keys"]} == { |
|
|
|
"HS256", |
|
|
|