mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Simplify webmin tests to use snapshot_platform (#127754)
This commit is contained in:
parent
08eafc54e6
commit
1663d8dfa9
@ -8,6 +8,8 @@ from homeassistant.helpers import entity_registry as er
|
||||
|
||||
from .conftest import async_init_integration
|
||||
|
||||
from tests.common import snapshot_platform
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||
async def test_sensor(
|
||||
@ -19,11 +21,4 @@ async def test_sensor(
|
||||
|
||||
entry = await async_init_integration(hass)
|
||||
|
||||
entity_entries = er.async_entries_for_config_entry(entity_registry, entry.entry_id)
|
||||
|
||||
assert entity_entries
|
||||
|
||||
for entity_entry in entity_entries:
|
||||
assert entity_entry == snapshot(name=f"{entity_entry.entity_id}-entry")
|
||||
assert (state := hass.states.get(entity_entry.entity_id))
|
||||
assert state == snapshot(name=f"{entity_entry.entity_id}-state")
|
||||
await snapshot_platform(hass, entity_registry, snapshot, entry.entry_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user