generated from john/python-template
This commit is contained in:
@@ -225,6 +225,32 @@ class TestSourcesPageRendering:
|
||||
assert "finish_reason" in response.text
|
||||
assert "response-123" in response.text
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_source_detail_page_shows_unavailable_placeholder_for_unmanaged_media_path(self, app_client):
|
||||
_, client = app_client
|
||||
|
||||
async with session_scope() as session:
|
||||
document = Document(name="Missing media document")
|
||||
session.add(document)
|
||||
await session.flush()
|
||||
source = Source(
|
||||
document_id=document.id,
|
||||
page_number=1,
|
||||
upload_name="missing-media.png",
|
||||
filename="missing-media.png",
|
||||
file_path=str((Path.cwd().parent / "external" / "missing-media.png").resolve()),
|
||||
file_hash="f" * 64,
|
||||
file_size_bytes=1,
|
||||
)
|
||||
session.add(source)
|
||||
await session.commit()
|
||||
source_id = str(source.id)
|
||||
|
||||
response = client.get(f"/ui/sources/{source_id}")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "No source media available for inspection." in response.text
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_source_detail_separates_v42_evidence_layers(self, app_client, seed_job):
|
||||
app, client = app_client
|
||||
|
||||
Reference in New Issue
Block a user