Use area_registry fixture in component tests (#118236)

This commit is contained in:
epenet 2024-05-27 12:40:08 +02:00 committed by GitHub
parent 46158f5c14
commit fa038bef92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 6 deletions

View file

@ -25,10 +25,11 @@ async def test_async_get_node_status_sensor_entity_id(hass: HomeAssistant) -> No
assert async_get_node_status_sensor_entity_id(hass, device.id) is None
async def test_async_get_nodes_from_area_id(hass: HomeAssistant) -> None:
async def test_async_get_nodes_from_area_id(
hass: HomeAssistant, area_registry: ar.AreaRegistry
) -> None:
"""Test async_get_nodes_from_area_id."""
area_reg = ar.async_get(hass)
area = area_reg.async_create("test")
area = area_registry.async_create("test")
assert not async_get_nodes_from_area_id(hass, area.id)