From c854acb3ee936445f648b3f31bdb51824035b5c7 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 12 Sep 2023 13:04:03 +0100 Subject: [PATCH] The correct method is `assert_called_once_with` not `called_once_with` Signed-off-by: Pedro Algarvio --- tests/pytests/unit/modules/test_msteams.py | 2 +- tests/pytests/unit/states/test_file.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/pytests/unit/modules/test_msteams.py b/tests/pytests/unit/modules/test_msteams.py index 05e6a3d2284..1307cd854bd 100644 --- a/tests/pytests/unit/modules/test_msteams.py +++ b/tests/pytests/unit/modules/test_msteams.py @@ -24,7 +24,7 @@ def test_post_card(): with patch("salt.utils.http.query", http_mock): ret = msteams.post_card("test") assert ret - assert http_mock.called_once_with( + assert http_mock.assert_called_once_with( method="POST", header_dict={"Content-Type": "application/json"}, data='{"text": "test", "title": Null, "themeColor": Null}', diff --git a/tests/pytests/unit/states/test_file.py b/tests/pytests/unit/states/test_file.py index fb1760825dd..e390bb9cdae 100644 --- a/tests/pytests/unit/states/test_file.py +++ b/tests/pytests/unit/states/test_file.py @@ -87,6 +87,6 @@ def test_file_recurse_directory_test(): "name": "/tmp/test", "result": False, } - assert salt_dunder["cp.list_master_dirs"].called_once_with( + assert salt_dunder["cp.list_master_dirs"].assert_called_once_with( prefix="does_not_exist/" )