From a4b9e47e2160314517758ec90eaa5f4dff68a091 Mon Sep 17 00:00:00 2001 From: Florian von Garrel Date: Sat, 29 Aug 2026 08:35:58 +0200 Subject: [PATCH] Split user flow init and data submission in Paperless-ngx tests (#180586) --- .../paperless_ngx/test_config_flow.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/components/paperless_ngx/test_config_flow.py b/tests/components/paperless_ngx/test_config_flow.py index d6c955007327..dad3789010d1 100644 --- a/tests/components/paperless_ngx/test_config_flow.py +++ b/tests/components/paperless_ngx/test_config_flow.py @@ -121,7 +121,14 @@ async def test_config_flow_error_handling( result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, - data=USER_INPUT_ONE, + ) + + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "user" + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + user_input=USER_INPUT_ONE, ) assert result["type"] is FlowResultType.FORM @@ -223,9 +230,17 @@ async def test_config_already_exists( result = await hass.config_entries.flow.async_init( DOMAIN, - data=USER_INPUT_ONE, context={"source": config_entries.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=USER_INPUT_ONE, + ) + assert result["type"] is FlowResultType.ABORT assert result["reason"] == "already_configured"