mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Ensure blink tests add config entry before updating it (#110415)
This commit is contained in:
parent
a3a1f8216c
commit
b3d9e15fb4
@ -85,10 +85,10 @@ async def test_migrate_V0(
|
||||
mock_config_entry: MockConfigEntry,
|
||||
) -> None:
|
||||
"""Test migration script version 0."""
|
||||
mock_config_entry.add_to_hass(hass)
|
||||
|
||||
hass.config_entries.async_update_entry(mock_config_entry, version=0)
|
||||
|
||||
mock_config_entry.add_to_hass(hass)
|
||||
assert await hass.config_entries.async_setup(mock_config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
entry = hass.config_entries.async_get_entry(mock_config_entry.entry_id)
|
||||
@ -104,6 +104,7 @@ async def test_migrate(
|
||||
version,
|
||||
) -> None:
|
||||
"""Test migration scripts."""
|
||||
mock_config_entry.add_to_hass(hass)
|
||||
|
||||
hass.config_entries.async_update_entry(
|
||||
mock_config_entry,
|
||||
@ -111,7 +112,6 @@ async def test_migrate(
|
||||
data={**mock_config_entry.data, "login_response": "Blah"},
|
||||
)
|
||||
|
||||
mock_config_entry.add_to_hass(hass)
|
||||
assert not await hass.config_entries.async_setup(mock_config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
entry = hass.config_entries.async_get_entry(mock_config_entry.entry_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user