From a1f7924904bca276bc2c6af579e12be9fab46315 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 29 Aug 2026 18:41:06 +0200 Subject: [PATCH] Split the Peblar user flow init from its data (#180653) --- tests/components/peblar/test_config_flow.py | 24 +++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tests/components/peblar/test_config_flow.py b/tests/components/peblar/test_config_flow.py index ea3573511bfe..cdb8967d2d33 100644 --- a/tests/components/peblar/test_config_flow.py +++ b/tests/components/peblar/test_config_flow.py @@ -66,9 +66,15 @@ async def test_user_flow_errors( mock_peblar.login.side_effect = side_effect result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": SOURCE_USER}, - data={ + DOMAIN, context={"source": 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: "127.0.0.1", CONF_PASSWORD: "OMGCATS!", }, @@ -105,9 +111,15 @@ async def test_user_flow_already_configured( mock_config_entry.add_to_hass(hass) result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": SOURCE_USER}, - data={ + DOMAIN, context={"source": 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: "127.0.0.1", CONF_PASSWORD: "OMGSPIDERS", },