feat: Complete code integration of modules
This commit is contained in:
20
backend/tests/test_crm_websocket.py
Normal file
20
backend/tests/test_crm_websocket.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
os.environ.setdefault("VELOCITY_JWT_SECRET", "test-secret")
|
||||
|
||||
from backend.main import app
|
||||
|
||||
|
||||
def test_crm_websocket_ack_roundtrip() -> None:
|
||||
with TestClient(app) as client:
|
||||
with client.websocket_connect("/ws/crm") as websocket:
|
||||
first = websocket.receive_json()
|
||||
assert first["type"] == "crm_presence"
|
||||
websocket.send_text("ping")
|
||||
second = websocket.receive_json()
|
||||
assert second["type"] == "crm_ack"
|
||||
assert second["data"] == "ping"
|
||||
Reference in New Issue
Block a user