Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imatiushin committed Mar 5, 2024
1 parent 323bfdd commit 7d66513
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions tests/test_cases/test_client/test_client_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,16 +379,11 @@ def test_client_check_integrity_collection(
f.seek(0)
json.dump(data, f, indent=4)
f.truncate()

client.check_integrity(2, stop_on_error=False, collection=collection_1.name)
try:
client.check_integrity(2, stop_on_error=False, collection=collection_1.name)
except Exception as e:
assert str(e) == f"Collection \"{collection_1.name}\" metadata is invalid/corrupted: 'test'"
errors = capsys.readouterr().out
assert all(
s in errors
for s in (
"Integrity check is running...\n",
f"Collection \"{collection_1.name}\" metadata is invalid/corrupted: 'test'\n\n",
)
)
collection_1.delete()
collection_2.delete()
for root, _, files in os.walk(os.path.curdir):
Expand Down

0 comments on commit 7d66513

Please sign in to comment.