Split the 17TRACK user flow init from its data (#180675)

This commit is contained in:
Franck Nijhof
2026-08-29 21:00:47 +02:00
committed by GitHub
parent 57aecb2607
commit 7fd88d54dd
@@ -81,10 +81,16 @@ async def test_flow_fails(
"""Test that the user step fails."""
mock_seventeentrack.return_value.profile.login.return_value = return_value
mock_seventeentrack.return_value.profile.login.side_effect = side_effect
failed_result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": SOURCE_USER},
data=VALID_CONFIG,
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_USER}
)
assert result["type"] is FlowResultType.FORM
assert result["step_id"] == "user"
failed_result = await hass.config_entries.flow.async_configure(
result["flow_id"],
VALID_CONFIG,
)
assert failed_result["errors"] == {"base": error}