mirror of
https://github.com/home-assistant/core.git
synced 2026-10-07 06:50:41 -04:00
Split user flow init and data submission in surepetcare config flow tests (#184099)
This commit is contained in:
@@ -129,15 +129,21 @@ async def test_flow_entry_already_exists(
|
||||
unique_id="test-username",
|
||||
)
|
||||
first_entry.add_to_hass(hass)
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={"source": config_entries.SOURCE_USER},
|
||||
)
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "user"
|
||||
assert result["errors"] == {}
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.surepetcare.async_setup_entry",
|
||||
return_value=True,
|
||||
):
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={"source": config_entries.SOURCE_USER},
|
||||
data={
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
user_input={
|
||||
"username": "test-username",
|
||||
"password": "test-password",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user