mirror of
https://github.com/home-assistant/core.git
synced 2025-11-21 00:36:54 +00:00
* New integration Amazon Devices * apply review comments * bump aioamazondevices * Add notify platform * pylance * full coverage for coordinator tests * cleanup imports * Add switch platform * update quality scale: docs items * update quality scale: brands * apply review comments * fix new ruff rule * simplify EntityDescription code * remove additional platforms for first PR * apply review comments * update IQS * apply last review comments * snapshot update * apply review comments * apply review comments
31 lines
914 B
Python
31 lines
914 B
Python
"""Tests for the Amazon Devices integration."""
|
|
|
|
from unittest.mock import AsyncMock
|
|
|
|
from syrupy.assertion import SnapshotAssertion
|
|
|
|
from homeassistant.components.amazon_devices.const import DOMAIN
|
|
from homeassistant.core import HomeAssistant
|
|
from homeassistant.helpers import device_registry as dr
|
|
|
|
from . import setup_integration
|
|
from .const import TEST_SERIAL_NUMBER
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
|
|
async def test_device_info(
|
|
hass: HomeAssistant,
|
|
snapshot: SnapshotAssertion,
|
|
mock_amazon_devices_client: AsyncMock,
|
|
mock_config_entry: MockConfigEntry,
|
|
device_registry: dr.DeviceRegistry,
|
|
) -> None:
|
|
"""Test device registry integration."""
|
|
await setup_integration(hass, mock_config_entry)
|
|
device_entry = device_registry.async_get_device(
|
|
identifiers={(DOMAIN, TEST_SERIAL_NUMBER)}
|
|
)
|
|
assert device_entry is not None
|
|
assert device_entry == snapshot
|