Skip to content

Commit

Permalink
chore: rectify mock assertions in >= 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisimcevoy committed Nov 1, 2024
1 parent c6eeab6 commit 3104631
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cloudsmith_cli/core/tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ def test_initialise_api_with_refreshable_access_token_set(
mocked_store_sso_tokens.assert_called_once_with(
"https://example.com", "new_access_token", "new_refresh_token"
)
mocked_update_refresh_attempted_at.called_once()

def test_initialise_api_with_recently_refreshed_access_token_and_empty_basic_auth_set(
self,
Expand All @@ -160,7 +159,7 @@ def test_initialise_api_with_recently_refreshed_access_token_and_empty_basic_aut
assert config.password == ""
mocked_refresh_access_token.assert_not_called()
mocked_store_sso_tokens.assert_not_called()
mocked_update_refresh_attempted_at.not_called()
mocked_update_refresh_attempted_at.assert_not_called()

def test_initialise_api_with_recently_refreshed_access_token_and_present_basic_auth(
self,
Expand All @@ -184,4 +183,4 @@ def test_initialise_api_with_recently_refreshed_access_token_and_present_basic_a
assert config.password == "password"
mocked_refresh_access_token.assert_not_called()
mocked_store_sso_tokens.assert_not_called()
mocked_update_refresh_attempted_at.not_called()
mocked_update_refresh_attempted_at.assert_not_called()

0 comments on commit 3104631

Please sign in to comment.