mirror of
https://github.com/home-assistant/core.git
synced 2025-05-12 01:49:16 +00:00
30 lines
785 B
Python
30 lines
785 B
Python
"""Tests for the Smarty component."""
|
|
|
|
from unittest.mock import AsyncMock
|
|
|
|
from syrupy import SnapshotAssertion
|
|
|
|
from homeassistant.components.smarty.const import DOMAIN
|
|
from homeassistant.core import HomeAssistant
|
|
from homeassistant.helpers import device_registry as dr
|
|
|
|
from . import setup_integration
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
|
|
async def test_device(
|
|
hass: HomeAssistant,
|
|
snapshot: SnapshotAssertion,
|
|
mock_smarty: AsyncMock,
|
|
mock_config_entry: MockConfigEntry,
|
|
device_registry: dr.DeviceRegistry,
|
|
) -> None:
|
|
"""Test device."""
|
|
await setup_integration(hass, mock_config_entry)
|
|
device = device_registry.async_get_device(
|
|
identifiers={(DOMAIN, mock_config_entry.entry_id)}
|
|
)
|
|
assert device
|
|
assert device == snapshot
|