From 40b951a2f3b17acf1a6db9284f40dc82afdce26b Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 29 Aug 2026 20:52:35 +0200 Subject: [PATCH] Split the StarLine user flow init from its data (#180663) --- tests/components/starline/test_config_flow.py | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tests/components/starline/test_config_flow.py b/tests/components/starline/test_config_flow.py index fd2a4f316184..273f967725c9 100644 --- a/tests/components/starline/test_config_flow.py +++ b/tests/components/starline/test_config_flow.py @@ -87,9 +87,15 @@ async def test_step_auth_app_code_falls(hass: HomeAssistant) -> None: "https://id.starline.ru/apiV3/application/getCode/", text='{"state": 0}}' ) result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": config_entries.SOURCE_USER}, - data={ + DOMAIN, context={"source": config_entries.SOURCE_USER} + ) + + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "auth_app" + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + user_input={ config_flow.CONF_APP_ID: TEST_APP_ID, config_flow.CONF_APP_SECRET: TEST_APP_SECRET, }, @@ -110,9 +116,15 @@ async def test_step_auth_app_token_falls(hass: HomeAssistant) -> None: "https://id.starline.ru/apiV3/application/getToken/", text='{"state": 0}' ) result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": config_entries.SOURCE_USER}, - data={ + DOMAIN, context={"source": config_entries.SOURCE_USER} + ) + + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "auth_app" + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + user_input={ config_flow.CONF_APP_ID: TEST_APP_ID, config_flow.CONF_APP_SECRET: TEST_APP_SECRET, },