mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Clean up start_subentry_reconfigure_flow API for tests (#147381)
This commit is contained in:
@@ -6497,9 +6497,7 @@ async def test_update_subentry_and_abort(
|
||||
err: Exception
|
||||
with mock_config_flow("comp", TestFlow):
|
||||
try:
|
||||
result = await entry.start_subentry_reconfigure_flow(
|
||||
hass, "test", subentry_id
|
||||
)
|
||||
result = await entry.start_subentry_reconfigure_flow(hass, subentry_id)
|
||||
except Exception as ex: # noqa: BLE001
|
||||
err = ex
|
||||
|
||||
@@ -6556,7 +6554,7 @@ async def test_reconfigure_subentry_create_subentry(hass: HomeAssistant) -> None
|
||||
mock_config_flow("comp", TestFlow),
|
||||
pytest.raises(ValueError, match="Source is reconfigure, expected user"),
|
||||
):
|
||||
await entry.start_subentry_reconfigure_flow(hass, "test", subentry_id)
|
||||
await entry.start_subentry_reconfigure_flow(hass, subentry_id)
|
||||
|
||||
await hass.async_block_till_done()
|
||||
|
||||
@@ -8079,7 +8077,7 @@ async def test_subentry_get_entry(
|
||||
|
||||
# A reconfigure flow finds the config entry and subentry
|
||||
with mock_config_flow("test", TestFlow):
|
||||
result = await entry.start_subentry_reconfigure_flow(hass, "test", subentry_id)
|
||||
result = await entry.start_subentry_reconfigure_flow(hass, subentry_id)
|
||||
assert (
|
||||
result["reason"]
|
||||
== "Found entry entry_title: mock_entry_id/Found subentry Test: mock_subentry_id"
|
||||
|
||||
Reference in New Issue
Block a user