Fix patching of getUserProfile

The actual profile is not necessary for this test. But this function always returns None and we shouldn't patch it to make it return something else.

Contributes to issue CURA-8539.
This commit is contained in:
Ghostkeeper 2021-11-22 15:52:24 +01:00
parent c5e22c53cc
commit fbbf1427b3
No known key found for this signature in database
GPG Key ID: D2A8871EE34EC59A

View File

@ -217,7 +217,7 @@ def test_failedLogin() -> None:
assert authorization_service.getUserProfile() is None
assert authorization_service.getAccessToken() is None
@patch.object(AuthorizationService, "getUserProfile", return_value=UserProfile())
@patch.object(AuthorizationService, "getUserProfile")
def test_storeAuthData(get_user_profile) -> None:
preferences = Preferences()
authorization_service = AuthorizationService(OAUTH_SETTINGS, preferences)