1
0
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:
Paulus Schoutsen
2025-06-23 15:45:33 -04:00
committed by GitHub
parent b4fe6f3843
commit 7f99cd2d2b
4 changed files with 14 additions and 33 deletions

View File

@@ -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"