From b0a1450a2b654d338d6fee7033b675b73275cb1a Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Sun, 31 Mar 2024 00:17:09 +0100 Subject: [PATCH] Fix ZHA websocket API test (#114495) * Fix result overwriting expected config * Use `BASE_CUSTOM_CONFIGURATION` for initial/expected config --- tests/components/zha/test_websocket_api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/components/zha/test_websocket_api.py b/tests/components/zha/test_websocket_api.py index 9cd475a7bf8..623d7acf602 100644 --- a/tests/components/zha/test_websocket_api.py +++ b/tests/components/zha/test_websocket_api.py @@ -303,7 +303,7 @@ async def test_update_zha_config( app_controller: ControllerApplication, ) -> None: """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 with patch( @@ -318,8 +318,8 @@ async def test_update_zha_config( await zha_client.send_json({ID: 6, TYPE: "zha/configuration"}) msg = await zha_client.receive_json() - configuration = msg["result"] - assert configuration == configuration + test_configuration = msg["result"] + assert test_configuration == configuration await hass.config_entries.async_unload(config_entry.entry_id)