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:
@@ -105,23 +105,23 @@ class TestSourcesPageRendering:
|
||||
session.add_all([target, other])
|
||||
await session.flush()
|
||||
|
||||
session.add(
|
||||
Source(
|
||||
document_id=target.id,
|
||||
page_number=1,
|
||||
upload_name="target_page.png",
|
||||
filename="target_stored.png",
|
||||
file_path="/tmp/target_stored.png",
|
||||
)
|
||||
)
|
||||
session.add(
|
||||
Source(
|
||||
document_id=other.id,
|
||||
page_number=1,
|
||||
upload_name="other_page.png",
|
||||
filename="other_stored.png",
|
||||
file_path="/tmp/other_stored.png",
|
||||
)
|
||||
session.add_all(
|
||||
[
|
||||
Source(
|
||||
document_id=target.id,
|
||||
page_number=1,
|
||||
upload_name="target_page.png",
|
||||
filename="target_stored.png",
|
||||
file_path="/tmp/target_stored.png",
|
||||
),
|
||||
Source(
|
||||
document_id=other.id,
|
||||
page_number=1,
|
||||
upload_name="other_page.png",
|
||||
filename="other_stored.png",
|
||||
file_path="/tmp/other_stored.png",
|
||||
),
|
||||
]
|
||||
)
|
||||
await session.commit()
|
||||
target_id = str(target.id)
|
||||
@@ -135,7 +135,7 @@ class TestSourcesPageRendering:
|
||||
assert "other_page.png" not in response.text
|
||||
|
||||
@pytest.mark.asyncio
|
||||
def test_sources_page_filters_to_job_context(self, app_client, seed_job):
|
||||
async def test_sources_page_filters_to_job_context(self, app_client, seed_job):
|
||||
_, client = app_client
|
||||
job_id = await seed_job(filename="job-page.png", transcription_text="job text")
|
||||
|
||||
@@ -147,7 +147,7 @@ class TestSourcesPageRendering:
|
||||
assert "job-page.png" in response.text
|
||||
|
||||
@pytest.mark.asyncio
|
||||
def test_sources_page_job_context_shows_job_source_status_and_error_detail(
|
||||
async def test_sources_page_job_context_shows_job_source_status_and_error_detail(
|
||||
self, app_client, seed_job
|
||||
):
|
||||
_, client = app_client
|
||||
|
||||
Reference in New Issue
Block a user