From f911f74383fcbb7119e788a3b192653e8d1eaae5 Mon Sep 17 00:00:00 2001 From: Ed Ropple Date: Wed, 15 Dec 2021 15:14:04 -0500 Subject: [PATCH] added update-live-stream test to exercise patches --- examples/video/exercise-live-streams.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/video/exercise-live-streams.py b/examples/video/exercise-live-streams.py index 6ed4972..92c3ba9 100644 --- a/examples/video/exercise-live-streams.py +++ b/examples/video/exercise-live-streams.py @@ -23,11 +23,20 @@ create_live_stream_request = mux_python.CreateLiveStreamRequest(playback_policy=[mux_python.PlaybackPolicy.PUBLIC], new_asset_settings=new_asset_settings) create_live_stream_response = live_api.create_live_stream(create_live_stream_request) logger.print_debug(str(create_live_stream_response)) + +stream = create_live_stream_response.data assert create_live_stream_response != None assert create_live_stream_response.data != None assert create_live_stream_response.data.id != None print("create-live-stream OK ✅") +# ========== update-live-stream ========== +update_live_stream_settings = mux_python.UpdateLiveStreamRequest(latency_mode='standard', reconnect_window=35) +updated_stream = live_api.update_live_stream(stream.id, update_live_stream_settings) +assert updated_stream.data.latency_mode == 'standard' +assert updated_stream.data.reconnect_window == 35 +print("update-live-stream OK ✅") + # ========== list-live-streams ========== list_live_streams_response = live_api.list_live_streams() logger.print_debug(str(list_live_streams_response)) @@ -95,7 +104,7 @@ # ========== reset-stream-key ========== live_stream_response_new_stream_key = live_api.reset_stream_key(create_live_stream_response.data.id) -logger.print_debug(live_stream_response_new_stream_key) +print(live_stream_response_new_stream_key) assert live_stream_response_new_stream_key != None assert live_stream_response_new_stream_key.data.stream_key != create_live_stream_response.data.stream_key print("reset-stream-key OK ✅")