From 504f2240f787c00bce001c575f2989822ed01b18 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Thu, 14 May 2026 23:19:49 +0200 Subject: [PATCH] make test more robust --- tests/test_api_stream.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_api_stream.py b/tests/test_api_stream.py index 1b18c55c..c3104a8e 100644 --- a/tests/test_api_stream.py +++ b/tests/test_api_stream.py @@ -94,7 +94,8 @@ def test_stream_image(test_client : TestClient) -> None: assert create_hash(output_buffer) == '0142782f' -def test_stream_video(test_client : TestClient, create_event : threading.Event) -> None: +@pytest.mark.parametrize('video_codec', [ 'av1', 'vp8' ]) +def test_stream_video(test_client : TestClient, create_event : threading.Event, video_codec : str) -> None: create_session_response = test_client.post('/session', json = { 'client_version': metadata.get('version') @@ -123,7 +124,7 @@ def test_stream_video(test_client : TestClient, create_event : threading.Event) }) with patch('facefusion.rtc_store.send_rtc_video', side_effect = partial(set_event, event = create_event)): - with test_client.websocket_connect('/stream?mode=video', subprotocols = + with test_client.websocket_connect('/stream?mode=video&codec=' + video_codec, subprotocols = [ 'access_token.' + access_token ]) as websocket: