Remove remaining run_immediately=False from tests (#115168)
This commit is contained in:
parent
9ef28f83ea
commit
3daecc7a31
2 changed files with 5 additions and 4 deletions
|
@ -353,13 +353,13 @@ async def async_test_home_assistant(
|
|||
|
||||
hass.set_state(CoreState.running)
|
||||
|
||||
@callback
|
||||
def clear_instance(event):
|
||||
async def clear_instance(event):
|
||||
"""Clear global instance."""
|
||||
await asyncio.sleep(0) # Give aiohttp one loop iteration to close
|
||||
INSTANCES.remove(hass)
|
||||
|
||||
hass.bus.async_listen_once(
|
||||
EVENT_HOMEASSISTANT_CLOSE, clear_instance, run_immediately=False
|
||||
EVENT_HOMEASSISTANT_CLOSE, clear_instance, run_immediately=True
|
||||
)
|
||||
|
||||
yield hass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue