2022-05-30 21:37:28 +00:00
|
|
|
"""Tests for diagnostics data."""
|
|
|
|
|
2023-10-30 13:07:42 +00:00
|
|
|
import pytest
|
2023-10-27 21:27:17 +00:00
|
|
|
from syrupy.assertion import SnapshotAssertion
|
|
|
|
|
2022-05-30 21:37:28 +00:00
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
2023-02-02 21:29:57 +00:00
|
|
|
from tests.typing import ClientSessionGenerator
|
2022-05-30 21:37:28 +00:00
|
|
|
|
|
|
|
|
2023-11-06 17:12:58 +00:00
|
|
|
@pytest.mark.parametrize(
|
|
|
|
"device_fixture",
|
|
|
|
[
|
|
|
|
"HWE-P1",
|
|
|
|
"HWE-SKT",
|
|
|
|
"HWE-WTR",
|
|
|
|
"SDM230",
|
2023-11-17 10:47:42 +00:00
|
|
|
"SDM630",
|
2023-11-06 17:12:58 +00:00
|
|
|
],
|
|
|
|
)
|
2022-05-30 21:37:28 +00:00
|
|
|
async def test_diagnostics(
|
|
|
|
hass: HomeAssistant,
|
2023-02-02 21:29:57 +00:00
|
|
|
hass_client: ClientSessionGenerator,
|
2022-05-30 21:37:28 +00:00
|
|
|
init_integration: MockConfigEntry,
|
2023-10-27 21:27:17 +00:00
|
|
|
snapshot: SnapshotAssertion,
|
2023-02-13 09:25:26 +00:00
|
|
|
) -> None:
|
2022-05-30 21:37:28 +00:00
|
|
|
"""Test diagnostics."""
|
2023-10-27 21:27:17 +00:00
|
|
|
assert (
|
|
|
|
await get_diagnostics_for_config_entry(hass, hass_client, init_integration)
|
|
|
|
== snapshot
|
|
|
|
)
|