Fix ZHA websocket API test (#114495)

* Fix result overwriting expected config

* Use `BASE_CUSTOM_CONFIGURATION` for initial/expected config
This commit is contained in:
TheJulianJES 2024-03-31 00:17:09 +01:00 committed by GitHub
parent d23b22b566
commit b0a1450a2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)