From a2bd59ab3bedaeed5aa319b11b8f2fa72bb512c0 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 19 Feb 2024 02:58:09 -0600 Subject: [PATCH] Fix switcher_kis tests not holding patch while calling async_block_till_done (#110916) --- tests/components/switcher_kis/test_config_flow.py | 4 ++-- tests/components/switcher_kis/test_init.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/components/switcher_kis/test_config_flow.py b/tests/components/switcher_kis/test_config_flow.py index 2afc2155d52..e5859a095ca 100644 --- a/tests/components/switcher_kis/test_config_flow.py +++ b/tests/components/switcher_kis/test_config_flow.py @@ -45,7 +45,7 @@ async def test_user_setup(hass: HomeAssistant, mock_bridge) -> None: result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": config_entries.SOURCE_USER} ) - await hass.async_block_till_done() + await hass.async_block_till_done() assert mock_bridge.is_running is False assert len(hass.data[DOMAIN][DATA_DISCOVERY].result()) == 2 @@ -72,7 +72,7 @@ async def test_user_setup_abort_no_devices_found( result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": config_entries.SOURCE_USER} ) - await hass.async_block_till_done() + await hass.async_block_till_done() assert mock_bridge.is_running is False assert len(hass.data[DOMAIN][DATA_DISCOVERY].result()) == 0 diff --git a/tests/components/switcher_kis/test_init.py b/tests/components/switcher_kis/test_init.py index f35ff9fbbf2..55be7d93905 100644 --- a/tests/components/switcher_kis/test_init.py +++ b/tests/components/switcher_kis/test_init.py @@ -40,6 +40,8 @@ async def test_async_setup_user_config_flow(hass: HomeAssistant, mock_bridge) -> result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": config_entries.SOURCE_USER} ) + await hass.async_block_till_done() + await hass.config_entries.flow.async_configure(result["flow_id"], {}) await hass.async_block_till_done()