From 79f576be1dee4448c9b78a6424aef132dff877ca Mon Sep 17 00:00:00 2001 From: erinhmclark Date: Wed, 12 Mar 2025 10:38:16 +0000 Subject: [PATCH] Run fix on tests. --- tests/databases/test_atlos_db.py | 4 ++-- tests/enrichers/test_thumbnail_enricher.py | 2 +- tests/storages/test_atlos_storage.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/databases/test_atlos_db.py b/tests/databases/test_atlos_db.py index 6c79a53..15f4b55 100644 --- a/tests/databases/test_atlos_db.py +++ b/tests/databases/test_atlos_db.py @@ -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 = { diff --git a/tests/enrichers/test_thumbnail_enricher.py b/tests/enrichers/test_thumbnail_enricher.py index 3ebc798..fdc28b7 100644 --- a/tests/enrichers/test_thumbnail_enricher.py +++ b/tests/enrichers/test_thumbnail_enricher.py @@ -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 diff --git a/tests/storages/test_atlos_storage.py b/tests/storages/test_atlos_storage.py index 81cae70..7268c8d 100644 --- a/tests/storages/test_atlos_storage.py +++ b/tests/storages/test_atlos_storage.py @@ -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]