Split the Samsung SyncThru user flow init from its data (#180661)

This commit is contained in:
Franck Nijhof
2026-08-29 20:51:26 +02:00
committed by GitHub
parent 018694cc0b
commit 41dbe41c11
+16 -6
View File
@@ -62,9 +62,14 @@ async def test_already_configured_by_url(
).add_to_hass(hass)
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_USER},
data=FIXTURE_USER_INPUT,
DOMAIN, context={"source": config_entries.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=FIXTURE_USER_INPUT
)
assert result["type"] is FlowResultType.CREATE_ENTRY
@@ -79,9 +84,14 @@ async def test_syncthru_not_supported(
"""Test we show user form on unsupported device."""
mock_syncthru.update.side_effect = SyncThruAPINotSupported
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_USER},
data=FIXTURE_USER_INPUT,
DOMAIN, context={"source": config_entries.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=FIXTURE_USER_INPUT
)
assert result["type"] is FlowResultType.FORM