mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Freeze config entry data (#32615)
* Freeze config entry data * Fix mutating entry.data * Fix config entry options tests
This commit is contained in:
@@ -423,7 +423,10 @@ async def test_event_handler_dispatches_updated_devices(
|
||||
data={"codeId": "1"},
|
||||
)
|
||||
request = event_request_factory(device_ids=device_ids, events=[event])
|
||||
config_entry.data[CONF_INSTALLED_APP_ID] = request.installed_app_id
|
||||
config_entry.data = {
|
||||
**config_entry.data,
|
||||
CONF_INSTALLED_APP_ID: request.installed_app_id,
|
||||
}
|
||||
called = False
|
||||
|
||||
def signal(ids):
|
||||
@@ -479,7 +482,10 @@ async def test_event_handler_fires_button_events(
|
||||
device.device_id, capability="button", attribute="button", value="pushed"
|
||||
)
|
||||
request = event_request_factory(events=[event])
|
||||
config_entry.data[CONF_INSTALLED_APP_ID] = request.installed_app_id
|
||||
config_entry.data = {
|
||||
**config_entry.data,
|
||||
CONF_INSTALLED_APP_ID: request.installed_app_id,
|
||||
}
|
||||
called = False
|
||||
|
||||
def handler(evt):
|
||||
|
||||
Reference in New Issue
Block a user