mirror of
https://github.com/azaion/detections.git
synced 2026-06-21 09:31:07 +00:00
Fixed tests
This commit is contained in:
@@ -59,7 +59,7 @@ def test_ft_p09_sse_event_delivery(
|
||||
data = json.loads(event.data)
|
||||
collected.append(data)
|
||||
first_event.set()
|
||||
if len(collected) >= 5:
|
||||
if data.get("mediaStatus") in ("AIProcessed", "Error"):
|
||||
break
|
||||
except BaseException as e:
|
||||
thread_exc.append(e)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
import os
|
||||
import threading
|
||||
import time
|
||||
import uuid
|
||||
@@ -7,7 +8,9 @@ from pathlib import Path
|
||||
import pytest
|
||||
import sseclient
|
||||
|
||||
FIXTURES_DIR = Path(__file__).resolve().parent.parent / "fixtures"
|
||||
FIXTURES_DIR = Path(
|
||||
os.environ.get("MEDIA_DIR", Path(__file__).resolve().parent.parent / "fixtures")
|
||||
)
|
||||
_VIDEO = str(FIXTURES_DIR / "video_test01.mp4")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user