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:
Paulus Schoutsen 2019-02-13 20:36:06 -08:00 committed by GitHub
parent 161c368c9d
commit 882f5ed079
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 54 additions and 169 deletions

View file

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