mirror of
https://github.com/home-assistant/core.git
synced 2025-11-15 22:10:09 +00:00
Make discovery flow tasks background tasks (#116327)
This commit is contained in:
@@ -44,7 +44,7 @@ async def test_setup_entry(
|
||||
),
|
||||
):
|
||||
assert await hass.config_entries.async_setup(config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
|
||||
assert len(mock_get_os_info.mock_calls) == 1
|
||||
|
||||
@@ -90,7 +90,7 @@ async def test_setup_zha(hass: HomeAssistant, addon_store_info) -> None:
|
||||
),
|
||||
):
|
||||
assert await hass.config_entries.async_setup(config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
assert len(mock_get_os_info.mock_calls) == 1
|
||||
|
||||
# Finish setting up ZHA
|
||||
@@ -144,7 +144,7 @@ async def test_setup_zha_multipan(
|
||||
),
|
||||
):
|
||||
assert await hass.config_entries.async_setup(config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
assert len(mock_get_os_info.mock_calls) == 1
|
||||
|
||||
# Finish setting up ZHA
|
||||
@@ -198,7 +198,7 @@ async def test_setup_zha_multipan_other_device(
|
||||
),
|
||||
):
|
||||
assert await hass.config_entries.async_setup(config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
assert len(mock_get_os_info.mock_calls) == 1
|
||||
|
||||
# Finish setting up ZHA
|
||||
|
||||
Reference in New Issue
Block a user