diff options
author | Matt Clay <matt@mystile.com> | 2023-04-12 19:04:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 19:04:42 +0200 |
commit | 3ec828703f020551241b4169f6a3f07c701e240a (patch) | |
tree | 5f349c9d714286fa0f8511c4de5628146eaa23a4 /test/units/galaxy/test_collection.py | |
parent | pep517 backend - Use correct import_module import (#80480) (diff) | |
download | ansible-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.py | 6 |
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 |