mirror of
https://github.com/azaion/detections.git
synced 2026-04-22 09:06:31 +00:00
[AZ-180] Refactor detection event handling and improve SSE support
- Updated the detection image endpoint to require a channel ID for event streaming. - Introduced a new endpoint for streaming detection events, allowing clients to receive real-time updates. - Enhanced the internal buffering mechanism for detection events to manage multiple channels. - Refactored the inference module to support the new event handling structure. Made-with: Cursor
This commit is contained in:
@@ -419,7 +419,10 @@ class TestDetectVideoEndpoint:
|
||||
from fastapi.testclient import TestClient
|
||||
client = TestClient(main.app)
|
||||
token = _access_jwt()
|
||||
with patch.object(main, "get_inference", return_value=_CaptureInf()):
|
||||
with (
|
||||
patch.object(main, "JWT_SECRET", _TEST_JWT_SECRET),
|
||||
patch.object(main, "get_inference", return_value=_CaptureInf()),
|
||||
):
|
||||
# Act
|
||||
r = client.post(
|
||||
"/detect/video",
|
||||
|
||||
Reference in New Issue
Block a user