From 252d27bc85f8ab6df2b028cbe1a08cccca679f87 Mon Sep 17 00:00:00 2001 From: Manu Date: Wed, 30 Sep 2026 08:25:49 +0200 Subject: [PATCH] Split user flow init and data submission in cert_expiry config flow tests (#183657) Co-authored-by: epenet <6771947+epenet@users.noreply.github.com> --- tests/components/cert_expiry/test_config_flow.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/components/cert_expiry/test_config_flow.py b/tests/components/cert_expiry/test_config_flow.py index be6d88dc0233..c00a74e6eeed 100644 --- a/tests/components/cert_expiry/test_config_flow.py +++ b/tests/components/cert_expiry/test_config_flow.py @@ -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"