generated from john/python-template
UI style refresh continued
This commit is contained in:
@@ -8,8 +8,9 @@ from transcription.config import Settings
|
||||
from transcription.db.models import Job
|
||||
from transcription.db.models import JobStatus
|
||||
from transcription.providers.base import TranscriptionResult
|
||||
from transcription.services import ServiceBundle
|
||||
from transcription.services.store import create_upload_job
|
||||
from transcription.worker import process_next_queued_job
|
||||
from transcription.services.workflows import advance_job
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
@@ -58,7 +59,11 @@ class TestPipelineSuccessFlow:
|
||||
_fake_transcribe_document_image,
|
||||
)
|
||||
|
||||
processed = await process_next_queued_job(session=async_session)
|
||||
services = ServiceBundle()
|
||||
queued_job = await services.jobs.read_next_queued_job(session=async_session)
|
||||
processed = queued_job is not None
|
||||
if queued_job is not None:
|
||||
await advance_job(job=queued_job, services=services, session=async_session)
|
||||
job = await async_session.get(Job, upload_result.job_id)
|
||||
|
||||
assert processed is True
|
||||
@@ -98,7 +103,11 @@ class TestPipelineFailureFlow:
|
||||
_fake_transcribe_document_image,
|
||||
)
|
||||
|
||||
processed = await process_next_queued_job(session=async_session)
|
||||
services = ServiceBundle()
|
||||
queued_job = await services.jobs.read_next_queued_job(session=async_session)
|
||||
processed = queued_job is not None
|
||||
if queued_job is not None:
|
||||
await advance_job(job=queued_job, services=services, session=async_session)
|
||||
job = await async_session.get(Job, upload_result.job_id)
|
||||
|
||||
assert processed is True
|
||||
|
||||
Reference in New Issue
Block a user