mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Use registry fixtures in tests (tailscale) (#118301)
This commit is contained in:
parent
21f5ac7715
commit
01be006d40
@ -15,12 +15,11 @@ from tests.common import MockConfigEntry
|
|||||||
|
|
||||||
async def test_tailscale_binary_sensors(
|
async def test_tailscale_binary_sensors(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
device_registry: dr.DeviceRegistry,
|
||||||
|
entity_registry: er.EntityRegistry,
|
||||||
init_integration: MockConfigEntry,
|
init_integration: MockConfigEntry,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the Tailscale binary sensors."""
|
"""Test the Tailscale binary sensors."""
|
||||||
entity_registry = er.async_get(hass)
|
|
||||||
device_registry = dr.async_get(hass)
|
|
||||||
|
|
||||||
state = hass.states.get("binary_sensor.frencks_iphone_client")
|
state = hass.states.get("binary_sensor.frencks_iphone_client")
|
||||||
entry = entity_registry.async_get("binary_sensor.frencks_iphone_client")
|
entry = entity_registry.async_get("binary_sensor.frencks_iphone_client")
|
||||||
assert entry
|
assert entry
|
||||||
|
@ -11,12 +11,11 @@ from tests.common import MockConfigEntry
|
|||||||
|
|
||||||
async def test_tailscale_sensors(
|
async def test_tailscale_sensors(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
device_registry: dr.DeviceRegistry,
|
||||||
|
entity_registry: er.EntityRegistry,
|
||||||
init_integration: MockConfigEntry,
|
init_integration: MockConfigEntry,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the Tailscale sensors."""
|
"""Test the Tailscale sensors."""
|
||||||
entity_registry = er.async_get(hass)
|
|
||||||
device_registry = dr.async_get(hass)
|
|
||||||
|
|
||||||
state = hass.states.get("sensor.router_expires")
|
state = hass.states.get("sensor.router_expires")
|
||||||
entry = entity_registry.async_get("sensor.router_expires")
|
entry = entity_registry.async_get("sensor.router_expires")
|
||||||
assert entry
|
assert entry
|
||||||
|
Loading…
x
Reference in New Issue
Block a user