From aadd4ae92bb96deb251e0350862d716a4f55ce87 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sun, 30 Aug 2026 13:01:50 +0200 Subject: [PATCH] Split the Azure Data Explorer user flow init from its data (#180769) --- .../azure_data_explorer/test_config_flow.py | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/components/azure_data_explorer/test_config_flow.py b/tests/components/azure_data_explorer/test_config_flow.py index 085e5ed53370..267eacea5685 100644 --- a/tests/components/azure_data_explorer/test_config_flow.py +++ b/tests/components/azure_data_explorer/test_config_flow.py @@ -24,7 +24,15 @@ from .const import BASE_CONFIG async def test_config_flow(hass: HomeAssistant, mock_setup_entry: AsyncMock) -> None: """Test we get the form.""" result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_USER}, data=None + DOMAIN, context={"source": config_entries.SOURCE_USER} + ) + + assert result["type"] is data_entry_flow.FlowResultType.FORM + assert result["step_id"] == "user" + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + user_input=None, ) assert result["type"] is data_entry_flow.FlowResultType.FORM assert result["errors"] == {} @@ -57,9 +65,15 @@ async def test_config_flow_errors( ) -> None: """Test we handle connection KustoServiceError.""" result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": config_entries.SOURCE_USER}, - data=None, + DOMAIN, context={"source": config_entries.SOURCE_USER} + ) + + assert result["type"] is data_entry_flow.FlowResultType.FORM + assert result["step_id"] == "user" + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + user_input=None, ) assert result["type"] is data_entry_flow.FlowResultType.FORM assert result["errors"] == {}