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"