test(realtime): cover recording activity event schema
All checks were successful
CI / test (push) Successful in 46s
All checks were successful
CI / test (push) Successful in 46s
This commit is contained in:
19
tests/test_realtime_schema.py
Normal file
19
tests/test_realtime_schema.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from app.realtime.schemas import IncomingRealtimeEvent
|
||||
|
||||
|
||||
def test_incoming_realtime_event_accepts_recording_activity_events():
|
||||
for event_name in (
|
||||
"recording_voice_start",
|
||||
"recording_voice_stop",
|
||||
"recording_video_start",
|
||||
"recording_video_stop",
|
||||
):
|
||||
event = IncomingRealtimeEvent.model_validate(
|
||||
{
|
||||
"event": event_name,
|
||||
"payload": {"chat_id": 1},
|
||||
}
|
||||
)
|
||||
assert event.event == event_name
|
||||
assert event.payload["chat_id"] == 1
|
||||
|
||||
Reference in New Issue
Block a user