generated from john/python-template
Continue troubleshooting unit tests. I think it is time to let Copilot have a crack at it.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Tests for the jobs page routes and action handlers."""
|
||||
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
from sqlmodel import select
|
||||
|
||||
from transcription.db import session_scope
|
||||
@@ -10,7 +11,7 @@ from transcription.db.models import Document, Job, JobSourceStatus, JobStatus
|
||||
# --- Helper Fixtures ---
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@pytest_asyncio.fixture
|
||||
async def seed_document_with_unlinked_job():
|
||||
"""Seed a document and a queued job for testing route actions."""
|
||||
async with session_scope() as session:
|
||||
@@ -45,7 +46,8 @@ class TestJobsPageRendering:
|
||||
assert "Transcription Pipeline Jobs" in response.text
|
||||
assert "No active or historical processing jobs found." in response.text
|
||||
|
||||
def test_jobs_page_lists_seeded_jobs(self, app_client, seed_job):
|
||||
@pytest.mark.asyncio
|
||||
async def test_jobs_page_lists_seeded_jobs(self, app_client, seed_job):
|
||||
_, client = app_client
|
||||
job_id = await seed_job(filename="seeded-document-page.png")
|
||||
|
||||
@@ -92,7 +94,7 @@ class TestJobsPageRendering:
|
||||
|
||||
assert response.status_code == 200
|
||||
assert f"Job Record: {job_id}" in response.text
|
||||
assert "Execution Logistics" in response.text
|
||||
assert "Job Execution Logistics" in response.text
|
||||
assert "openai" in response.text
|
||||
assert "gpt-4o" in response.text
|
||||
assert "View Linked Document" in response.text
|
||||
|
||||
Reference in New Issue
Block a user