mirror of
https://github.com/home-assistant/core.git
synced 2026-09-26 09:23:17 -04:00
Split the ROVA user flow init from its data (#180676)
This commit is contained in:
@@ -31,10 +31,9 @@ async def test_user(hass: HomeAssistant, mock_rova: MagicMock) -> None:
|
||||
assert result.get("step_id") == "user"
|
||||
|
||||
# test with all information provided
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={"source": SOURCE_USER},
|
||||
data={
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
user_input={
|
||||
CONF_ZIP_CODE: ZIP_CODE,
|
||||
CONF_HOUSE_NUMBER: HOUSE_NUMBER,
|
||||
CONF_HOUSE_NUMBER_SUFFIX: HOUSE_NUMBER_SUFFIX,
|
||||
@@ -106,9 +105,15 @@ async def test_abort_if_already_setup(hass: HomeAssistant) -> None:
|
||||
).add_to_hass(hass)
|
||||
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={"source": SOURCE_USER},
|
||||
data={
|
||||
DOMAIN, context={"source": SOURCE_USER}
|
||||
)
|
||||
|
||||
assert result.get("type") is FlowResultType.FORM
|
||||
assert result.get("step_id") == "user"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
user_input={
|
||||
CONF_ZIP_CODE: ZIP_CODE,
|
||||
CONF_HOUSE_NUMBER: HOUSE_NUMBER,
|
||||
CONF_HOUSE_NUMBER_SUFFIX: HOUSE_NUMBER_SUFFIX,
|
||||
|
||||
Reference in New Issue
Block a user