Update m* tests to use entity & device registry fixtures (#103980)

This commit is contained in:
Jan-Philipp Benecke 2023-11-15 10:33:11 +01:00 committed by GitHub
parent 51c1ea85f3
commit 9326ea09a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 361 additions and 298 deletions

View file

@ -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