1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Update h* tests to use entity & device registry fixtures (#103866)

* Update h* tests to use entity & device registry fixtures

* Add missed lines
This commit is contained in:
Jan-Philipp Benecke
2023-11-12 19:52:32 +01:00
committed by GitHub
parent 3a531f5698
commit eda475fe25
48 changed files with 330 additions and 240 deletions

View File

@@ -527,7 +527,10 @@ def _get_schema_default(schema, key_name):
raise KeyError(f"{key_name} not found in schema")
async def test_options_flow_v2(hass: HomeAssistant) -> None:
async def test_options_flow_v2(
hass: HomeAssistant,
device_registry: dr.DeviceRegistry,
) -> None:
"""Test options config flow for a V2 bridge."""
entry = MockConfigEntry(
domain="hue",
@@ -536,9 +539,8 @@ async def test_options_flow_v2(hass: HomeAssistant) -> None:
)
entry.add_to_hass(hass)
dev_reg = dr.async_get(hass)
mock_dev_id = "aabbccddee"
dev_reg.async_get_or_create(
device_registry.async_get_or_create(
config_entry_id=entry.entry_id, identifiers={(const.DOMAIN, mock_dev_id)}
)