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:
Jan-Philipp Benecke 2023-11-12 19:45:30 +01:00 committed by GitHub
parent abb1328a67
commit 9ab1cb83d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 239 additions and 161 deletions

View file

@ -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", ({},))