mirror of
https://github.com/home-assistant/core.git
synced 2026-09-26 01:11:51 -04:00
Split the 17TRACK user flow init from its data (#180675)
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user