Skip to content

Commit be8568b

Browse files
committed
Fix user_info test
1 parent 11f3af7 commit be8568b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

testsuite/tests/kuadrant/authorino/metadata/test_user_info.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ def authorization(authorization, rhsso):
1313
Adds auth metadata OIDC UserInfo which fetches OIDC UserInfo in request-time.
1414
Adds a simple rule that accepts only when fetched UserInfo contains the email address of the default RHSSO user.
1515
"""
16-
user = rhsso.client.admin.get_user(rhsso.user)
1716
authorization.add_user_info_metadata("user-info", "rhsso")
18-
authorization.add_auth_rule("rule", Rule("auth.metadata.user-info.email", "eq", user["email"]))
17+
authorization.add_auth_rule("rule",
18+
Rule("auth.metadata.user-info.email", "eq", rhsso.user.properties["email"]))
1919
return authorization
2020

2121

@@ -27,6 +27,6 @@ def test_correct_auth(client, auth):
2727

2828
def test_incorrect_auth(client, auth, rhsso):
2929
"""Updates RHSSO user email address and tests incorrect auth"""
30-
rhsso.client.admin.update_user(rhsso.user, {"email": "[email protected]"})
30+
rhsso.user.update_user(email="[email protected]")
3131
response = client.get("get", auth=auth)
3232
assert response.status_code == 403

0 commit comments

Comments
 (0)