mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-03-21 22:56:47 +00:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user