Skip to content

Commit fa4f2a0

Browse files
committed
clear mock's call history
1 parent 9f55a10 commit fa4f2a0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/test_client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,11 @@ def test_hash_text(mock_anonymizer, mock_spacy_annotator):
263263
)
264264

265265
# Test with custom hash type
266+
mock_anonymizer.reset_mock() # Reset the mock to clear the previous call
266267
result = runner.invoke(app, ["hash-text", sample_text, "--hash-type", "md5"])
267268

268-
print(f"Exit code: {result.exit_code}")
269-
print(f"Output: {result.stdout}")
270-
print(f"Exception: {result.exception}")
271-
272269
assert result.exit_code == 0
270+
assert "5ab5c95f works at 7b23f032" in result.stdout
273271
mock_anonymizer.assert_called_with(
274272
anonymizer_type=AnonymizerType.HASH, hash_type=HashType.MD5
275273
)

0 commit comments

Comments
 (0)