web_api_client = <swh.web.client.client.WebAPIClient object at 0x7f56be7ec5f8>
web_api_mock = <requests_mock.mocker.Mocker object at 0x7f56be7ec8d0>
def test_authenticate_failure(web_api_client, web_api_mock):
msg = "Authentication error"
web_api_client.oidc_session = Mock()
web_api_client.oidc_session.refresh.side_effect = Exception(msg)
refresh_token = "user-refresh-token"
with pytest.raises(AuthenticationError) as e:
> web_api_client.authenticate(refresh_token)
E AttributeError: 'WebAPIClient' object has no attribute 'authenticate'
.tox/py3/lib/python3.7/site-packages/swh/web/client/tests/test_web_api_client.py:192: AttributeError
TEST RESULT
TEST RESULT
- Run At
- Aug 27 2020, 1:43 PM