mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 14:15:12 +02:00
Fix ZHA websocket API test (#114495)
* Fix result overwriting expected config * Use `BASE_CUSTOM_CONFIGURATION` for initial/expected config
This commit is contained in:
@@ -303,7 +303,7 @@ async def test_update_zha_config(
|
|||||||
app_controller: ControllerApplication,
|
app_controller: ControllerApplication,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test updating ZHA custom configuration."""
|
"""Test updating ZHA custom configuration."""
|
||||||
configuration: dict = deepcopy(CONFIG_WITH_ALARM_OPTIONS)
|
configuration: dict = deepcopy(BASE_CUSTOM_CONFIGURATION)
|
||||||
configuration["data"]["zha_options"]["default_light_transition"] = 10
|
configuration["data"]["zha_options"]["default_light_transition"] = 10
|
||||||
|
|
||||||
with patch(
|
with patch(
|
||||||
@@ -318,8 +318,8 @@ async def test_update_zha_config(
|
|||||||
|
|
||||||
await zha_client.send_json({ID: 6, TYPE: "zha/configuration"})
|
await zha_client.send_json({ID: 6, TYPE: "zha/configuration"})
|
||||||
msg = await zha_client.receive_json()
|
msg = await zha_client.receive_json()
|
||||||
configuration = msg["result"]
|
test_configuration = msg["result"]
|
||||||
assert configuration == configuration
|
assert test_configuration == configuration
|
||||||
|
|
||||||
await hass.config_entries.async_unload(config_entry.entry_id)
|
await hass.config_entries.async_unload(config_entry.entry_id)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user