mirror of
https://github.com/home-assistant/core.git
synced 2026-02-22 02:47:14 +00:00
Co-authored-by: Mr. Bubbles <manni@zapto.de> Co-authored-by: Erik Montnemery <erik@montnemery.com> Co-authored-by: Joostlek <joostlek@outlook.com>
30 lines
905 B
Python
30 lines
905 B
Python
"""Hue BLE light tests."""
|
|
|
|
from unittest.mock import AsyncMock
|
|
|
|
from syrupy.assertion import SnapshotAssertion
|
|
|
|
from homeassistant.config_entries import ConfigEntryState
|
|
from homeassistant.core import HomeAssistant
|
|
from homeassistant.helpers import entity_registry as er
|
|
|
|
from tests.common import MockConfigEntry, snapshot_platform
|
|
|
|
|
|
async def test_light(
|
|
hass: HomeAssistant,
|
|
mock_scanner_count: AsyncMock,
|
|
mock_light: AsyncMock,
|
|
mock_config_entry: MockConfigEntry,
|
|
entity_registry: er.EntityRegistry,
|
|
snapshot: SnapshotAssertion,
|
|
) -> None:
|
|
"""Test light entity setup."""
|
|
mock_config_entry.add_to_hass(hass)
|
|
await hass.config_entries.async_setup(mock_config_entry.entry_id)
|
|
await hass.async_block_till_done()
|
|
|
|
assert mock_config_entry.state is ConfigEntryState.LOADED
|
|
|
|
await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id)
|