1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-08 09:38:58 +01:00

Handle late abort when creating subentry (#145765)

* Handle late abort when creating subentry

* Move error handling to the base class

* Narrow down expected error in test
This commit is contained in:
Erik Montnemery
2025-05-28 12:26:28 +02:00
committed by GitHub
parent e4cc842584
commit a857461059
4 changed files with 123 additions and 5 deletions
+1 -1
View File
@@ -2226,7 +2226,7 @@ async def test_entry_subentry_no_context(
@pytest.mark.parametrize(
("unique_id", "expected_result"),
[(None, does_not_raise()), ("test", pytest.raises(HomeAssistantError))],
[(None, does_not_raise()), ("test", pytest.raises(data_entry_flow.AbortFlow))],
)
async def test_entry_subentry_duplicate(
hass: HomeAssistant,