2022-11-26 02:12:07 +00:00
|
|
|
"""Tests for the diagnostics data provided by the BSBLan integration."""
|
2023-08-23 18:20:08 +00:00
|
|
|
|
|
|
|
from syrupy import SnapshotAssertion
|
2022-11-26 02:12:07 +00:00
|
|
|
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
2023-08-23 18:20:08 +00:00
|
|
|
from tests.common import MockConfigEntry
|
2022-11-26 02:12:07 +00:00
|
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
2023-02-02 21:29:57 +00:00
|
|
|
from tests.typing import ClientSessionGenerator
|
2022-11-26 02:12:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
async def test_diagnostics(
|
|
|
|
hass: HomeAssistant,
|
2023-02-02 21:29:57 +00:00
|
|
|
hass_client: ClientSessionGenerator,
|
2022-11-26 02:12:07 +00:00
|
|
|
init_integration: MockConfigEntry,
|
2023-08-23 18:20:08 +00:00
|
|
|
snapshot: SnapshotAssertion,
|
2023-02-10 15:05:01 +00:00
|
|
|
) -> None:
|
2022-11-26 02:12:07 +00:00
|
|
|
"""Test diagnostics."""
|
2024-08-23 06:42:36 +00:00
|
|
|
diagnostics_data = await get_diagnostics_for_config_entry(
|
|
|
|
hass, hass_client, init_integration
|
2022-11-26 02:12:07 +00:00
|
|
|
)
|
2024-08-23 06:42:36 +00:00
|
|
|
assert diagnostics_data == snapshot
|