From 755a049110af0c4114fcfc2718990157d9aa3b5c Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 29 Aug 2026 18:44:22 +0200 Subject: [PATCH] Split the Season user flow init from its data (#180651) --- tests/components/season/test_config_flow.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/components/season/test_config_flow.py b/tests/components/season/test_config_flow.py index a3e0142fe28a..6f6be77fc4f0 100644 --- a/tests/components/season/test_config_flow.py +++ b/tests/components/season/test_config_flow.py @@ -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"