41 lines
1.7 KiB
Diff
41 lines
1.7 KiB
Diff
|
From 3ec828703f020551241b4169f6a3f07c701e240a Mon Sep 17 00:00:00 2001
|
||
|
From: Matt Clay <matt@mystile.com>
|
||
|
Date: Wed, 12 Apr 2023 10:04:42 -0700
|
||
|
Subject: [PATCH] Fix unit test asserts (#80500)
|
||
|
|
||
|
---
|
||
|
test/units/galaxy/test_collection.py | 6 +++---
|
||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/test/units/galaxy/test_collection.py b/test/units/galaxy/test_collection.py
|
||
|
index 04a6a43436bbd1..5d6f32456dda89 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
|