From fe6cd0dca4bd4b0cac7044d0f3d58dc00c5d5ae1 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sun, 30 Aug 2026 13:05:48 +0200 Subject: [PATCH] Split the Telegram bot user flow init from its data (#180771) --- .../telegram_bot/test_config_flow.py | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tests/components/telegram_bot/test_config_flow.py b/tests/components/telegram_bot/test_config_flow.py index 3000adda996a..9d3b7fb00bc2 100644 --- a/tests/components/telegram_bot/test_config_flow.py +++ b/tests/components/telegram_bot/test_config_flow.py @@ -786,9 +786,15 @@ async def test_duplicate_entry(hass: HomeAssistant) -> None: # test: import first entry success result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": SOURCE_USER}, - data=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=data, ) await hass.async_block_till_done() @@ -801,9 +807,15 @@ async def test_duplicate_entry(hass: HomeAssistant) -> None: # test: import 2nd entry failed due to duplicate result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": SOURCE_USER}, - data=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=data, ) await hass.async_block_till_done()