V5.1 Update tests and documentation
Quality Gate / gate (push) Failing after 11s

This commit is contained in:
Jim Lancaster
2026-08-23 16:01:53 -05:00
parent ebf659b26c
commit ed6998d8da
18 changed files with 184 additions and 385 deletions
-10
View File
@@ -2,16 +2,6 @@ from transcription.ui.components.media_urls import public_media_path_label
from transcription.ui.components.media_urls import resolve_media_url
def test_resolve_media_url_maps_managed_absolute_path_to_upload_route(tmp_path):
upload_dir = tmp_path / "uploads"
canonical_path = upload_dir / "documents" / "abc" / "page.jpg"
canonical_path.parent.mkdir(parents=True, exist_ok=True)
canonical_path.write_bytes(b"x")
resolved = resolve_media_url("documents/abc/page.jpg", upload_dir=upload_dir, base_url="http://localhost:8000")
assert resolved == "http://localhost:8000/uploads/documents/abc/page.jpg"
def test_resolve_media_url_rejects_absolute_filesystem_path(tmp_path):
upload_dir = tmp_path / "uploads"
absolute_path = upload_dir / "documents" / "abc" / "page.jpg"
+1
View File
@@ -113,3 +113,4 @@ async def test_document_source_media_rejects_cross_document_access(app_client):
response = client.get(f"/api/documents/{other_id}/sources/{source_id}/media")
assert response.status_code == 404
assert response.json()["detail"] == "Source not found for Document"