diff options
author | Jaime van Kessel <nallath@gmail.com> | 2018-09-24 18:37:06 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2018-09-24 18:37:06 +0300 |
commit | b48adf5b3e4fd68f3329105d17a668021738df9f (patch) | |
tree | cc7d3c3920e79e938aaf604ce32da5d5ce246d27 /tests/TestOAuth2.py | |
parent | f16a9c62b52723c4974d6d333f3c293aebd9ce78 (diff) |
Typing fixes
CURA-5744
Diffstat (limited to 'tests/TestOAuth2.py')
-rw-r--r-- | tests/TestOAuth2.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/TestOAuth2.py b/tests/TestOAuth2.py index 708dd2d41b..7deb712aea 100644 --- a/tests/TestOAuth2.py +++ b/tests/TestOAuth2.py @@ -29,14 +29,14 @@ SUCCESFULL_AUTH_RESPONSE = AuthenticationResponse(access_token = "beep", refresh MALFORMED_AUTH_RESPONSE = AuthenticationResponse() -def test_cleanAuthService(): +def test_cleanAuthService() -> None: # Ensure that when setting up an AuthorizationService, no data is set. authorization_service = AuthorizationService(Preferences(), OAUTH_SETTINGS) assert authorization_service.getUserProfile() is None assert authorization_service.getAccessToken() is None -def test_failedLogin(): +def test_failedLogin() -> None: authorization_service = AuthorizationService(Preferences(), OAUTH_SETTINGS) authorization_service.onAuthenticationError.emit = MagicMock() authorization_service.onAuthStateChanged.emit = MagicMock() @@ -55,7 +55,7 @@ def test_failedLogin(): assert authorization_service.getAccessToken() is None -def test_localAuthServer(): +def test_localAuthServer() -> None: preferences = Preferences() authorization_service = AuthorizationService(preferences, OAUTH_SETTINGS) with patch.object(webbrowser, "open_new") as webrowser_open: @@ -73,7 +73,7 @@ def test_localAuthServer(): assert stop_auth_server.call_count == 1 -def test_loginAndLogout(): +def test_loginAndLogout() -> None: preferences = Preferences() authorization_service = AuthorizationService(preferences, OAUTH_SETTINGS) authorization_service.onAuthenticationError.emit = MagicMock() @@ -103,7 +103,7 @@ def test_loginAndLogout(): assert preferences.getValue("test/auth_data") == "{}" -def test_wrongServerResponses(): +def test_wrongServerResponses() -> None: authorization_service = AuthorizationService(Preferences(), OAUTH_SETTINGS) with patch.object(AuthorizationHelpers, "parseJWT", return_value=UserProfile()): authorization_service._onAuthStateChanged(MALFORMED_AUTH_RESPONSE) |