diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2019-05-28 08:48:00 +0300 |
---|---|---|
committer | Lipu Fei <lipu.fei815@gmail.com> | 2019-05-28 08:48:00 +0300 |
commit | 6db96abe2fcbff18474e357557f34d9af7a33809 (patch) | |
tree | 2b82d438cb88854106747a589bd13dc47f5c0d5b /tests/API | |
parent | b23448559216fd67202c9b0fe45bc763c5f1ffb4 (diff) |
Fix tests
Diffstat (limited to 'tests/API')
-rw-r--r-- | tests/API/TestAccount.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/API/TestAccount.py b/tests/API/TestAccount.py index 7a9997c771..34e803ede4 100644 --- a/tests/API/TestAccount.py +++ b/tests/API/TestAccount.py @@ -21,14 +21,14 @@ def test_login(): account._authorization_service = mocked_auth_service account.login() - mocked_auth_service.startAuthorizationFlow.assert_called_once() + mocked_auth_service.startAuthorizationFlow.assert_called_once_with() # Fake a sucesfull login account._onLoginStateChanged(True) # Attempting to log in again shouldn't change anything. account.login() - mocked_auth_service.startAuthorizationFlow.assert_called_once() + mocked_auth_service.startAuthorizationFlow.assert_called_once_with() def test_initialize(): @@ -37,7 +37,7 @@ def test_initialize(): account._authorization_service = mocked_auth_service account.initialize() - mocked_auth_service.loadAuthDataFromPreferences.assert_called_once() + mocked_auth_service.loadAuthDataFromPreferences.assert_called_once_with() def test_logout(): @@ -46,7 +46,7 @@ def test_logout(): account._authorization_service = mocked_auth_service account.logout() - mocked_auth_service.deleteAuthData.assert_not_called() # We weren't logged in, so nothing should happen + mocked_auth_service.deleteAuthData.assert_called_once_with() # We weren't logged in, so nothing should happen assert not account.isLoggedIn # Pretend the stage changed @@ -54,7 +54,7 @@ def test_logout(): assert account.isLoggedIn account.logout() - mocked_auth_service.deleteAuthData.assert_called_once() + mocked_auth_service.deleteAuthData.assert_called_once_with() def test_errorLoginState(): @@ -108,4 +108,4 @@ def test_userProfile(user_profile): assert returned_user_profile["user_id"] == "user_id!" mocked_auth_service.getUserProfile = MagicMock(return_value=None) - assert account.userProfile is None
\ No newline at end of file + assert account.userProfile is None |