Use registry fixtures in tests (r) (#118293)

This commit is contained in:
epenet 2024-05-28 14:23:31 +02:00 committed by GitHub
parent 2545b7d3bb
commit 8d8696075b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 234 additions and 180 deletions

View file

@ -982,7 +982,9 @@ async def test_reload(hass: HomeAssistant) -> None:
@respx.mock
async def test_entity_config(hass: HomeAssistant) -> None:
async def test_entity_config(
hass: HomeAssistant, entity_registry: er.EntityRegistry
) -> None:
"""Test entity configuration."""
config = {
@ -1006,7 +1008,6 @@ async def test_entity_config(hass: HomeAssistant) -> None:
assert await async_setup_component(hass, SENSOR_DOMAIN, config)
await hass.async_block_till_done()
entity_registry = er.async_get(hass)
assert entity_registry.async_get("sensor.rest_sensor").unique_id == "very_unique"
state = hass.states.get("sensor.rest_sensor")