mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Make all devolo Home Network conflig flow tests end correctly (#144378)
This commit is contained in:
parent
763f2bcfcc
commit
ed6cfa42f0
@ -77,14 +77,30 @@ async def test_form_error(hass: HomeAssistant, exception_type, expected_error) -
|
|||||||
):
|
):
|
||||||
result2 = await hass.config_entries.flow.async_configure(
|
result2 = await hass.config_entries.flow.async_configure(
|
||||||
result["flow_id"],
|
result["flow_id"],
|
||||||
{
|
{CONF_IP_ADDRESS: IP, CONF_PASSWORD: ""},
|
||||||
CONF_IP_ADDRESS: IP,
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
assert result2["type"] is FlowResultType.FORM
|
assert result2["type"] is FlowResultType.FORM
|
||||||
assert result2["errors"] == {CONF_BASE: expected_error}
|
assert result2["errors"] == {CONF_BASE: expected_error}
|
||||||
|
|
||||||
|
with (
|
||||||
|
patch(
|
||||||
|
"homeassistant.components.devolo_home_network.async_setup_entry",
|
||||||
|
return_value=True,
|
||||||
|
),
|
||||||
|
patch(
|
||||||
|
"homeassistant.components.devolo_home_network.config_flow.Device",
|
||||||
|
new=MockDevice,
|
||||||
|
),
|
||||||
|
):
|
||||||
|
result3 = await hass.config_entries.flow.async_configure(
|
||||||
|
result2["flow_id"],
|
||||||
|
{CONF_IP_ADDRESS: IP, CONF_PASSWORD: ""},
|
||||||
|
)
|
||||||
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
|
assert result3["type"] is FlowResultType.CREATE_ENTRY
|
||||||
|
|
||||||
|
|
||||||
async def test_zeroconf(hass: HomeAssistant) -> None:
|
async def test_zeroconf(hass: HomeAssistant) -> None:
|
||||||
"""Test that the zeroconf form is served."""
|
"""Test that the zeroconf form is served."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user