Don't directly update config entries (#20877)
* Don't directly update config entries * Use ConfigEntryNotReady * Fix tests * Remove old test * Lint
This commit is contained in:
parent
161c368c9d
commit
882f5ed079
11 changed files with 54 additions and 169 deletions
|
@ -411,13 +411,18 @@ async def test_updating_entry_data(manager):
|
|||
entry = MockConfigEntry(
|
||||
domain='test',
|
||||
data={'first': True},
|
||||
state=config_entries.ENTRY_STATE_SETUP_ERROR,
|
||||
)
|
||||
entry.add_to_manager(manager)
|
||||
|
||||
manager.async_update_entry(entry)
|
||||
assert entry.data == {
|
||||
'first': True
|
||||
}
|
||||
|
||||
manager.async_update_entry(entry, data={
|
||||
'second': True
|
||||
})
|
||||
|
||||
assert entry.data == {
|
||||
'second': True
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue