summaryrefslogtreecommitdiffstats
path: root/test/units/galaxy/test_collection.py
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2023-04-12 19:04:42 +0200
committerGitHub <noreply@github.com>2023-04-12 19:04:42 +0200
commit3ec828703f020551241b4169f6a3f07c701e240a (patch)
tree5f349c9d714286fa0f8511c4de5628146eaa23a4 /test/units/galaxy/test_collection.py
parentpep517 backend - Use correct import_module import (#80480) (diff)
downloadansible-3ec828703f020551241b4169f6a3f07c701e240a.tar.xz
ansible-3ec828703f020551241b4169f6a3f07c701e240a.zip
Fix unit test asserts (#80500)
Diffstat (limited to 'test/units/galaxy/test_collection.py')
-rw-r--r--test/units/galaxy/test_collection.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/units/galaxy/test_collection.py b/test/units/galaxy/test_collection.py
index 04a6a43436..5d6f32456d 100644
--- a/test/units/galaxy/test_collection.py
+++ b/test/units/galaxy/test_collection.py
@@ -1060,7 +1060,7 @@ def test_verify_file_hash_deleted_file(manifest_info):
with patch.object(collection.os.path, 'isfile', MagicMock(return_value=False)) as mock_isfile:
collection._verify_file_hash(b'path/', 'file', digest, error_queue)
- assert mock_isfile.called_once
+ mock_isfile.assert_called_once()
assert len(error_queue) == 1
assert error_queue[0].installed is None
@@ -1083,7 +1083,7 @@ def test_verify_file_hash_matching_hash(manifest_info):
with patch.object(collection.os.path, 'isfile', MagicMock(return_value=True)) as mock_isfile:
collection._verify_file_hash(b'path/', 'file', digest, error_queue)
- assert mock_isfile.called_once
+ mock_isfile.assert_called_once()
assert error_queue == []
@@ -1105,7 +1105,7 @@ def test_verify_file_hash_mismatching_hash(manifest_info):
with patch.object(collection.os.path, 'isfile', MagicMock(return_value=True)) as mock_isfile:
collection._verify_file_hash(b'path/', 'file', different_digest, error_queue)
- assert mock_isfile.called_once
+ mock_isfile.assert_called_once()
assert len(error_queue) == 1
assert error_queue[0].installed == digest