Config entry update data (#16843)
* WIP * Allow updating data of a config entry
This commit is contained in:
parent
2b2502c91c
commit
f4974f58fe
2 changed files with 23 additions and 0 deletions
|
@ -315,3 +315,20 @@ async def test_loading_default_config(hass):
|
|||
await manager.async_load()
|
||||
|
||||
assert len(manager.async_entries()) == 0
|
||||
|
||||
|
||||
async def test_updating_entry_data(manager):
|
||||
"""Test that we can update an entry data."""
|
||||
entry = MockConfigEntry(
|
||||
domain='test',
|
||||
data={'first': True},
|
||||
)
|
||||
entry.add_to_manager(manager)
|
||||
|
||||
manager.async_update_entry(entry, data={
|
||||
'second': True
|
||||
})
|
||||
|
||||
assert entry.data == {
|
||||
'second': True
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue