Split user flow init and data submission in cert_expiry config flow tests (#183657)

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
This commit is contained in:
Manu
2026-09-30 08:25:49 +02:00
committed by GitHub
co-authored by epenet
parent c87c0f04ff
commit 252d27bc85
@@ -72,9 +72,13 @@ 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": config_entries.SOURCE_USER},
data={CONF_HOST: HOST, CONF_PORT: PORT},
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={CONF_HOST: HOST, CONF_PORT: PORT}
)
assert result["type"] is FlowResultType.ABORT
assert result["reason"] == "already_configured"