mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Change instances of assert_called_once to assert_called_once_with
Grumbles something about python 3.5 and 3.6...
This commit is contained in:
parent
ca8fa9cfac
commit
9e6263b1f1
2 changed files with 5 additions and 5 deletions
|
@ -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():
|
||||
|
@ -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():
|
||||
|
|
|
@ -101,7 +101,7 @@ def test_initialize():
|
|||
initialize_preferences = MagicMock()
|
||||
authorization_service = AuthorizationService(OAUTH_SETTINGS, original_preference)
|
||||
authorization_service.initialize(initialize_preferences)
|
||||
initialize_preferences.addPreference.assert_called_once()
|
||||
initialize_preferences.addPreference.assert_called_once_with("test/auth_data", "{}")
|
||||
original_preference.addPreference.assert_not_called()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue