From a8a41381cb8493ff2254054c5c740051f1dd4131 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 22 Nov 2021 15:14:05 +0100 Subject: Remove test simulating request error in user profile We're no longer generating that error. We're generating a QNetworkReply with a built-in error code and those errors are handled the same way as the failed requests tested above. Contributes to issue CURA-8539. --- tests/TestOAuth2.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'tests') diff --git a/tests/TestOAuth2.py b/tests/TestOAuth2.py index d39dc35258..cb28d8625c 100644 --- a/tests/TestOAuth2.py +++ b/tests/TestOAuth2.py @@ -199,12 +199,6 @@ def test_refreshAccesTokenWithoutData(): authorization_service.refreshAccessToken() authorization_service.onAuthStateChanged.emit.assert_not_called() -def test_userProfileException(): - authorization_service = AuthorizationService(OAUTH_SETTINGS, Preferences()) - authorization_service.initialize() - authorization_service._parseJWT = MagicMock(side_effect=requests.exceptions.ConnectionError) - assert authorization_service.getUserProfile() is None - def test_failedLogin() -> None: authorization_service = AuthorizationService(OAUTH_SETTINGS, Preferences()) authorization_service.onAuthenticationError.emit = MagicMock() -- cgit v1.2.3