Skip to content
Snippets Groups Projects
Verified Commit 28cf49c8 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

swh.auth: Add coverage to logout endpoint

Related to T3079
parent 93eba03c
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@ def mock_keycloak(requests_mock):
requests_mock.get(WELL_KNOWN["well-known"], json=WELL_KNOWN)
requests_mock.post(WELL_KNOWN["token_endpoint"], json=OIDC_PROFILE)
requests_mock.get(WELL_KNOWN["userinfo_endpoint"], json=USER_INFO)
requests_mock.post(WELL_KNOWN["end_session_endpoint"], status_code=204)
return requests_mock
......
......@@ -75,3 +75,9 @@ def test_auth_userinfo(mock_keycloak, keycloak_open_id_connect):
assert actual_user_info == USER_INFO
assert mock_keycloak.called
def test_auth_logout(mock_keycloak, keycloak_open_id_connect):
keycloak_open_id_connect.logout("refresh-token")
assert mock_keycloak.called
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment