2024-03-06 20:22:08 +01:00
|
|
|
"""Test cases for the Webmin sensors."""
|
2024-03-08 19:16:21 +01:00
|
|
|
|
2024-03-06 20:22:08 +01:00
|
|
|
import pytest
|
|
|
|
|
from syrupy.assertion import SnapshotAssertion
|
|
|
|
|
|
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
from homeassistant.helpers import entity_registry as er
|
|
|
|
|
|
|
|
|
|
from .conftest import async_init_integration
|
|
|
|
|
|
2024-10-24 20:10:53 +02:00
|
|
|
from tests.common import snapshot_platform
|
|
|
|
|
|
2024-03-06 20:22:08 +01:00
|
|
|
|
|
|
|
|
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
|
|
|
|
async def test_sensor(
|
|
|
|
|
hass: HomeAssistant,
|
|
|
|
|
entity_registry: er.EntityRegistry,
|
|
|
|
|
snapshot: SnapshotAssertion,
|
|
|
|
|
) -> None:
|
|
|
|
|
"""Test the sensor entities and states."""
|
|
|
|
|
|
|
|
|
|
entry = await async_init_integration(hass)
|
|
|
|
|
|
2024-10-24 20:10:53 +02:00
|
|
|
await snapshot_platform(hass, entity_registry, snapshot, entry.entry_id)
|