mirror of
https://github.com/home-assistant/core.git
synced 2026-09-26 01:11:51 -04:00
Split the Moehlenhoff Alpha2 user flow init from its data (#180778)
This commit is contained in:
@@ -60,9 +60,15 @@ async def test_form_duplicate_error(hass: HomeAssistant) -> None:
|
||||
partialmethod(mock_update_data, hass),
|
||||
):
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
data={"host": MOCK_BASE_HOST},
|
||||
context={"source": config_entries.SOURCE_USER},
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "user"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
user_input={"host": MOCK_BASE_HOST},
|
||||
)
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
assert result["reason"] == "already_configured"
|
||||
|
||||
Reference in New Issue
Block a user