Split user flow init and data submission in ambient_station config flow tests (#183654)

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
This commit is contained in:
Manu
2026-09-30 08:20:58 +02:00
committed by GitHub
co-authored by epenet
parent 1517ebce59
commit 1948f87d94
@@ -49,12 +49,17 @@ async def test_create_entry(
}
async def test_duplicate_error(
hass: HomeAssistant, config, config_entry, setup_config_entry
) -> None:
@pytest.mark.usefixtures("setup_config_entry")
async def test_duplicate_error(hass: HomeAssistant, config) -> None:
"""Test that errors are shown when duplicates are added."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_USER}, data=config
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=config
)
assert result["type"] is FlowResultType.ABORT
assert result["reason"] == "already_configured"