mirror of
https://github.com/home-assistant/core.git
synced 2025-11-21 08:47:15 +00:00
* Add Cambridge Audio integration * Add zeroconf discovery to Cambridge Audio * Bump aiostreammagic to 2.0.1 * Bump aiostreammagic to 2.0.3 * Add tests to Cambridge Audio * Fix package names for Cambridge Audio * Removed unnecessary mock from Cambridge Audio tests * Clean up Cambridge Audio integration * Add additional zeroconf tests for Cambridge Audio * Update tests/components/cambridge_audio/test_config_flow.py --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
30 lines
875 B
Python
30 lines
875 B
Python
"""Tests for the Cambridge Audio integration."""
|
|
|
|
from unittest.mock import AsyncMock
|
|
|
|
from syrupy import SnapshotAssertion
|
|
|
|
from homeassistant.components.cambridge_audio.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_info(
|
|
hass: HomeAssistant,
|
|
snapshot: SnapshotAssertion,
|
|
mock_stream_magic_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, mock_config_entry.unique_id)}
|
|
)
|
|
assert device_entry is not None
|
|
assert device_entry == snapshot
|