From ca0879b8342d0821500ab43825264ba1c5eaa218 Mon Sep 17 00:00:00 2001 From: Adam Stus Date: Tue, 10 Dec 2024 09:49:53 +0100 Subject: [PATCH] Fixed test has_calls on Python 3.12 (#1936) --- tests/test_connection.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/tests/test_connection.py b/tests/test_connection.py index 8345c1c3cd..ecb81f6da2 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -1219,16 +1219,22 @@ def test_generate_jwt_with_passphrase( result.output == "Enter private key file password (press enter for empty) []: \nfunny token\n" ) - mocked_get_token.has_calls( - mock.call( - user="FooBar", account="account1", privatekey_path=str(f), key_password=None - ), - mock.call( - user="FooBar", - account="account1", - privatekey_path=str(f), - key_password=passphrase, - ), + mocked_get_token.assert_has_calls( + [ + mock.call( + user="FooBar", + account="account1", + privatekey_path=str(f), + key_password=None, + ), + mock.call( + user="FooBar", + account="account1", + privatekey_path=str(f), + key_password=passphrase, + ), + ], + any_order=True, )