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.
This commit is contained in:
Ghostkeeper 2021-11-22 15:14:05 +01:00
parent 4139350496
commit a8a41381cb
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -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()