Skip to content

Commit 30c57bf

Browse files
committed
Issue #702 improve assert in test_persist_multiple_chunks
for easier debugging
1 parent 036ec7d commit 30c57bf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tests/extra/job_management/test_stac_job_db.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,7 @@ def handle_row(series):
363363
job_db_exists._upload_items_bulk(collection_id=job_db_exists.collection_id, items=items)
364364

365365
# 10 items in total, 3 items per chunk, should result in 4 calls
366-
assert mock_requests_post.call_count == 4
367-
expected_calls = [
366+
assert [c.kwargs for c in mock_requests_post.call_args_list] == [
368367
{
369368
"url": f"http://fake-stac-api/collections/{job_db_exists.collection_id}/bulk_items",
370369
"auth": None,
@@ -386,6 +385,3 @@ def handle_row(series):
386385
"json": {"method": "upsert", "items": {item.id: item.to_dict() for item in items[9:]}},
387386
},
388387
]
389-
390-
for i, call in enumerate(mock_requests_post.call_args_list):
391-
assert call[1] == expected_calls[i]

0 commit comments

Comments
 (0)