The correct method is assert_called_once_with not called_once_with

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-09-12 13:04:03 +01:00
parent 628592f22b
commit c854acb3ee
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF
2 changed files with 2 additions and 2 deletions

View file

@ -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}',

View file

@ -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/"
)