mirror of
https://github.com/home-assistant/core.git
synced 2026-09-26 17:31:15 -04:00
Split the Season user flow init from its data (#180651)
This commit is contained in:
@@ -39,8 +39,16 @@ async def test_single_instance_allowed(
|
||||
mock_config_entry.add_to_hass(hass)
|
||||
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": SOURCE_USER}, data={CONF_TYPE: TYPE_ASTRONOMICAL}
|
||||
DOMAIN, context={"source": SOURCE_USER}
|
||||
)
|
||||
|
||||
assert result.get("type") is FlowResultType.ABORT
|
||||
assert result.get("reason") == "already_configured"
|
||||
assert result.get("type") is FlowResultType.FORM
|
||||
assert result.get("step_id") == "user"
|
||||
|
||||
result2 = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
user_input={CONF_TYPE: TYPE_ASTRONOMICAL},
|
||||
)
|
||||
|
||||
assert result2.get("type") is FlowResultType.ABORT
|
||||
assert result2.get("reason") == "already_configured"
|
||||
|
||||
Reference in New Issue
Block a user