fix: mock Celery broker in idle transcript validation test

test_validation_idle_transcript_with_recording_allowed called
validate_transcript_for_processing without mocking
task_is_scheduled_or_active, which attempts a real Celery
broker connection (AMQP port 5672). Other tests in the same
file already mock this — apply the same pattern here.
This commit is contained in:
Igor Loskutov
2026-02-11 16:26:24 -05:00
parent 2d81321733
commit 67aea78243

View File

@@ -291,7 +291,12 @@ async def test_validation_idle_transcript_with_recording_allowed():
recording_id="test-recording-id",
)
result = await validate_transcript_for_processing(mock_transcript)
with patch(
"reflector.services.transcript_process.task_is_scheduled_or_active"
) as mock_celery_check:
mock_celery_check.return_value = False
result = await validate_transcript_for_processing(mock_transcript)
assert isinstance(result, ValidationOk)
assert result.recording_id == "test-recording-id"