mirror of https://github.com/home-assistant/core
26 lines
798 B
Python
26 lines
798 B
Python
"""Test Reolink diagnostics."""
|
|
|
|
from unittest.mock import MagicMock
|
|
|
|
from syrupy.assertion import SnapshotAssertion
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from tests.common import MockConfigEntry
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
|
from tests.typing import ClientSessionGenerator
|
|
|
|
|
|
async def test_entry_diagnostics(
|
|
hass: HomeAssistant,
|
|
hass_client: ClientSessionGenerator,
|
|
reolink_connect: MagicMock,
|
|
config_entry: MockConfigEntry,
|
|
snapshot: SnapshotAssertion,
|
|
) -> None:
|
|
"""Test Reolink diagnostics."""
|
|
assert await hass.config_entries.async_setup(config_entry.entry_id)
|
|
await hass.async_block_till_done()
|
|
diag = await get_diagnostics_for_config_entry(hass, hass_client, config_entry)
|
|
assert diag == snapshot
|