From fbbf1427b3d46a2fa1e2598782e609907ebb58bf Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 22 Nov 2021 15:52:24 +0100 Subject: [PATCH] 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. --- tests/TestOAuth2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/TestOAuth2.py b/tests/TestOAuth2.py index dcb3af6877..f34d5dcf5f 100644 --- a/tests/TestOAuth2.py +++ b/tests/TestOAuth2.py @@ -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)