mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Fix slow config_flow test in devolo Home Network (#60364)
This commit is contained in:
parent
22bdd38583
commit
c9dc3a61af
@ -102,11 +102,15 @@ async def test_zeroconf(hass: HomeAssistant):
|
|||||||
== DISCOVERY_INFO["hostname"].split(".", maxsplit=1)[0]
|
== DISCOVERY_INFO["hostname"].split(".", maxsplit=1)[0]
|
||||||
)
|
)
|
||||||
|
|
||||||
result2 = await hass.config_entries.flow.async_configure(
|
with patch(
|
||||||
result["flow_id"],
|
"homeassistant.components.devolo_home_network.async_setup_entry",
|
||||||
{},
|
return_value=True,
|
||||||
)
|
):
|
||||||
await hass.async_block_till_done()
|
result2 = await hass.config_entries.flow.async_configure(
|
||||||
|
result["flow_id"],
|
||||||
|
{},
|
||||||
|
)
|
||||||
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
assert result2["title"] == "test"
|
assert result2["title"] == "test"
|
||||||
assert result2["data"] == {
|
assert result2["data"] == {
|
||||||
@ -131,13 +135,17 @@ async def test_abort_if_configued(hass: HomeAssistant):
|
|||||||
result = await hass.config_entries.flow.async_init(
|
result = await hass.config_entries.flow.async_init(
|
||||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||||
)
|
)
|
||||||
await hass.config_entries.flow.async_configure(
|
with patch(
|
||||||
result["flow_id"],
|
"homeassistant.components.devolo_home_network.async_setup_entry",
|
||||||
{
|
return_value=True,
|
||||||
CONF_IP_ADDRESS: IP,
|
):
|
||||||
},
|
await hass.config_entries.flow.async_configure(
|
||||||
)
|
result["flow_id"],
|
||||||
await hass.async_block_till_done()
|
{
|
||||||
|
CONF_IP_ADDRESS: IP,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
# Abort on concurrent user flow
|
# Abort on concurrent user flow
|
||||||
result = await hass.config_entries.flow.async_init(
|
result = await hass.config_entries.flow.async_init(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user