Update a-c* tests to use entity & device registry fixtures (#103793)
* Update a-c* tests to use entity & device registry fixtures * Revert some changes * Revert formatting * retrigger CI
This commit is contained in:
parent
abb1328a67
commit
9ab1cb83d8
19 changed files with 239 additions and 161 deletions
|
@ -337,13 +337,13 @@ async def test_bad_formatted_automations(
|
|||
async def test_delete_automation(
|
||||
hass: HomeAssistant,
|
||||
hass_client: ClientSessionGenerator,
|
||||
entity_registry: er.EntityRegistry,
|
||||
hass_config_store,
|
||||
setup_automation,
|
||||
) -> None:
|
||||
"""Test deleting an automation."""
|
||||
ent_reg = er.async_get(hass)
|
||||
|
||||
assert len(ent_reg.entities) == 2
|
||||
assert len(entity_registry.entities) == 2
|
||||
|
||||
with patch.object(config, "SECTIONS", ["automation"]):
|
||||
assert await async_setup_component(hass, "config", {})
|
||||
|
@ -371,7 +371,7 @@ async def test_delete_automation(
|
|||
|
||||
assert hass_config_store["automations.yaml"] == [{"id": "moon"}]
|
||||
|
||||
assert len(ent_reg.entities) == 1
|
||||
assert len(entity_registry.entities) == 1
|
||||
|
||||
|
||||
@pytest.mark.parametrize("automation_config", ({},))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue