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

swh.auth.pytest_plugin: Install missing side-effect for login method

Related to T2858
parent acf199d6
No related branches found
Tags v0.3.2
1 merge request!2swh.auth.pytest_plugin: Install missing side-effect for login method
......@@ -147,6 +147,7 @@ class KeycloackOpenIDConnectMock(KeycloakOpenIDConnect):
self.refresh_token.side_effect = exception
self.userinfo.side_effect = exception
self.logout.side_effect = exception
self.login.side_effect = exception
def keycloak_mock_factory(
......
......@@ -53,6 +53,9 @@ def test_keycloak_authorization_code_fail(keycloak_mock):
with pytest.raises(KeycloakError):
keycloak_mock.authorization_code("auth-code", "redirect-uri")
with pytest.raises(KeycloakError):
keycloak_mock.login("username", "password")
def test_keycloak_authorization_code(keycloak_mock):
actual_response = keycloak_mock.authorization_code("auth-code", "redirect-uri")
......
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