mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Convert async_get_webrtc_client_configuration to a callback (#129329)
This commit is contained in:
@@ -250,7 +250,7 @@ async def test_async_register_ice_server(
|
||||
assert not called
|
||||
|
||||
camera = get_camera_from_entity_id(hass, "camera.demo_camera")
|
||||
config = await camera.async_get_webrtc_client_configuration()
|
||||
config = camera.async_get_webrtc_client_configuration()
|
||||
|
||||
assert config.configuration.ice_servers == [
|
||||
RTCIceServer(urls="stun:example.com"),
|
||||
@@ -275,7 +275,7 @@ async def test_async_register_ice_server(
|
||||
|
||||
unregister_2 = async_register_ice_servers(hass, get_ice_servers_2)
|
||||
|
||||
config = await camera.async_get_webrtc_client_configuration()
|
||||
config = camera.async_get_webrtc_client_configuration()
|
||||
assert config.configuration.ice_servers == [
|
||||
RTCIceServer(urls="stun:example.com"),
|
||||
RTCIceServer(urls="turn:example.com"),
|
||||
@@ -292,7 +292,7 @@ async def test_async_register_ice_server(
|
||||
|
||||
unregister()
|
||||
|
||||
config = await camera.async_get_webrtc_client_configuration()
|
||||
config = camera.async_get_webrtc_client_configuration()
|
||||
assert config.configuration.ice_servers == [
|
||||
RTCIceServer(
|
||||
urls=["stun:example2.com", "turn:example2.com"],
|
||||
@@ -306,7 +306,7 @@ async def test_async_register_ice_server(
|
||||
# unregister the second ICE server
|
||||
unregister_2()
|
||||
|
||||
config = await camera.async_get_webrtc_client_configuration()
|
||||
config = camera.async_get_webrtc_client_configuration()
|
||||
assert config.configuration.ice_servers == []
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user