mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 23:41:48 -05:00
Split the Soma user flow init from its data (#180664)
This commit is contained in:
@@ -87,8 +87,14 @@ async def test_full_flow(hass: HomeAssistant) -> None:
|
||||
hass.data[DOMAIN] = {}
|
||||
with patch.object(SomaApi, "list_devices", return_value={"result": "success"}):
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={"source": SOURCE_USER},
|
||||
data={"host": MOCK_HOST, "port": MOCK_PORT},
|
||||
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={"host": MOCK_HOST, "port": MOCK_PORT},
|
||||
)
|
||||
assert result["type"] is FlowResultType.CREATE_ENTRY
|
||||
|
||||
Reference in New Issue
Block a user