Update m* tests to use entity & device registry fixtures (#103980)
This commit is contained in:
parent
51c1ea85f3
commit
9326ea09a5
46 changed files with 361 additions and 298 deletions
|
@ -15,6 +15,8 @@ from tests.typing import WebSocketGenerator
|
|||
|
||||
async def test_remove_config_entry_device(
|
||||
hass: HomeAssistant,
|
||||
device_registry: dr.DeviceRegistry,
|
||||
entity_registry: er.EntityRegistry,
|
||||
gps_sensor: Sensor,
|
||||
integration: MockConfigEntry,
|
||||
gateway: BaseSyncGateway,
|
||||
|
@ -27,11 +29,9 @@ async def test_remove_config_entry_device(
|
|||
assert await async_setup_component(hass, "config", {})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
device_registry = dr.async_get(hass)
|
||||
device_entry = device_registry.async_get_device(
|
||||
identifiers={(DOMAIN, f"{config_entry.entry_id}-{node_id}")}
|
||||
)
|
||||
entity_registry = er.async_get(hass)
|
||||
state = hass.states.get(entity_id)
|
||||
|
||||
assert gateway.sensors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue