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
19 changed files with 239 additions and 161 deletions

View File

@@ -248,10 +248,12 @@ async def test_webhook_msg(
async def test_google_config_expose_entity(
hass: HomeAssistant, mock_cloud_setup, mock_cloud_login
hass: HomeAssistant,
entity_registry: er.EntityRegistry,
mock_cloud_setup,
mock_cloud_login,
) -> None:
"""Test Google config exposing entity method uses latest config."""
entity_registry = er.async_get(hass)
# Enable exposing new entities to Google
exposed_entities: ExposedEntities = hass.data[DATA_EXPOSED_ENTITIES]
@@ -274,10 +276,12 @@ async def test_google_config_expose_entity(
async def test_google_config_should_2fa(
hass: HomeAssistant, mock_cloud_setup, mock_cloud_login
hass: HomeAssistant,
entity_registry: er.EntityRegistry,
mock_cloud_setup,
mock_cloud_login,
) -> None:
"""Test Google config disabling 2FA method uses latest config."""
entity_registry = er.async_get(hass)
# Register a light entity
entity_entry = entity_registry.async_get_or_create(