Use registry fixtures in tests (r) (#118293)
This commit is contained in:
parent
2545b7d3bb
commit
8d8696075b
30 changed files with 234 additions and 180 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue