Run fix on tests.

This commit is contained in:
erinhmclark
2025-03-12 10:38:16 +00:00
parent 94aeee8313
commit 79f576be1d
3 changed files with 4 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ def test_failed_with_atlos_id(atlos_db, metadata, mocker):
fake_resp = FakeAPIResponse({}, raise_error=False)
post_mock = mocker.patch.object(atlos_db, "_post", return_value=fake_resp)
atlos_db.failed(metadata, "failure reason")
expected_endpoint = f"/api/v2/source_material/metadata/42/auto_archiver"
expected_endpoint = "/api/v2/source_material/metadata/42/auto_archiver"
expected_json = {"metadata": {"processed": True, "status": "error", "error": "failure reason"}}
post_mock.assert_called_once_with(expected_endpoint, json=expected_json)
@@ -85,7 +85,7 @@ def test_done_with_atlos_id(atlos_db, metadata, mocker):
fake_resp = FakeAPIResponse({}, raise_error=False)
post_mock = mocker.patch.object(atlos_db, "_post", return_value=fake_resp)
atlos_db.done(metadata)
expected_endpoint = f"/api/v2/source_material/metadata/99/auto_archiver"
expected_endpoint = "/api/v2/source_material/metadata/99/auto_archiver"
expected_results = metadata.metadata.copy()
expected_results["timestamp"] = now.isoformat()
expected_json = {

View File

@@ -79,7 +79,7 @@ def test_enrich_handles_probe_failure(thumbnail_enricher, metadata_with_video, m
thumbnail_enricher.enrich(metadata_with_video)
# Ensure error was logged
mock_logger.assert_called_with(f"error getting duration of video video.mp4: Probe error")
mock_logger.assert_called_with("error getting duration of video video.mp4: Probe error")
# Ensure no thumbnails were created
thumbnails = metadata_with_video.media[0].get("thumbnails")
assert thumbnails is None

View File

@@ -90,7 +90,7 @@ def test_upload_not_uploaded(tmp_path, atlos_storage: AtlosStorage, metadata: Me
get_mock.assert_called_once()
post_mock.assert_called_once()
expected_endpoint = f"/api/v2/source_material/upload/202"
expected_endpoint = "/api/v2/source_material/upload/202"
call_args = post_mock.call_args[0]
assert call_args[0] == expected_endpoint
call_kwargs = post_mock.call_args[1]