mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
Fix failing entity reuse test (#103342)
* Fix failing entity reuse test * One more test
This commit is contained in:
parent
0ea0a1ed06
commit
ae1117bc74
@ -1539,7 +1539,7 @@ async def test_reuse_entity_object_after_abort(hass: HomeAssistant) -> None:
|
|||||||
await platform.async_add_entities([ent])
|
await platform.async_add_entities([ent])
|
||||||
with pytest.raises(
|
with pytest.raises(
|
||||||
HomeAssistantError,
|
HomeAssistantError,
|
||||||
match="Entity invalid cannot be added a second time to an entity platform",
|
match="Entity 'invalid' cannot be added a second time to an entity platform",
|
||||||
):
|
):
|
||||||
await platform.async_add_entities([ent])
|
await platform.async_add_entities([ent])
|
||||||
|
|
||||||
@ -1562,7 +1562,7 @@ async def test_reuse_entity_object_after_entity_registry_remove(
|
|||||||
|
|
||||||
with pytest.raises(
|
with pytest.raises(
|
||||||
HomeAssistantError,
|
HomeAssistantError,
|
||||||
match="Entity test.test_5678 cannot be added a second time",
|
match="Entity 'test.test_5678' cannot be added a second time",
|
||||||
):
|
):
|
||||||
await platform.async_add_entities([ent])
|
await platform.async_add_entities([ent])
|
||||||
|
|
||||||
@ -1587,6 +1587,6 @@ async def test_reuse_entity_object_after_entity_registry_disabled(
|
|||||||
|
|
||||||
with pytest.raises(
|
with pytest.raises(
|
||||||
HomeAssistantError,
|
HomeAssistantError,
|
||||||
match="Entity test.test_5678 cannot be added a second time",
|
match="Entity 'test.test_5678' cannot be added a second time",
|
||||||
):
|
):
|
||||||
await platform.async_add_entities([ent])
|
await platform.async_add_entities([ent])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user