mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 10:47:51 +00:00
32 lines
844 B
Python
32 lines
844 B
Python
"""Tests for the SmartThings component init module."""
|
|
|
|
from unittest.mock import AsyncMock
|
|
|
|
from syrupy import SnapshotAssertion
|
|
|
|
from homeassistant.components.smartthings.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_devices(
|
|
hass: HomeAssistant,
|
|
snapshot: SnapshotAssertion,
|
|
devices: AsyncMock,
|
|
mock_config_entry: MockConfigEntry,
|
|
device_registry: dr.DeviceRegistry,
|
|
) -> None:
|
|
"""Test all entities."""
|
|
await setup_integration(hass, mock_config_entry)
|
|
|
|
device_id = devices.get_devices.return_value[0].device_id
|
|
|
|
device = device_registry.async_get_device({(DOMAIN, device_id)})
|
|
|
|
assert device is not None
|
|
assert device == snapshot
|