2022-12-12 21:28:27 +00:00
|
|
|
"""Test AirVisual Pro diagnostics."""
|
2023-08-22 07:31:31 +00:00
|
|
|
from syrupy import SnapshotAssertion
|
|
|
|
|
2023-02-09 15:09:13 +00:00
|
|
|
from homeassistant.core import HomeAssistant
|
2022-12-12 21:28:27 +00:00
|
|
|
|
|
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
2023-02-09 15:09:13 +00:00
|
|
|
from tests.typing import ClientSessionGenerator
|
2022-12-12 21:28:27 +00:00
|
|
|
|
|
|
|
|
2023-02-09 15:09:13 +00:00
|
|
|
async def test_entry_diagnostics(
|
|
|
|
hass: HomeAssistant,
|
|
|
|
config_entry,
|
|
|
|
hass_client: ClientSessionGenerator,
|
|
|
|
setup_airvisual_pro,
|
2023-08-22 07:31:31 +00:00
|
|
|
snapshot: SnapshotAssertion,
|
2023-02-09 15:09:13 +00:00
|
|
|
) -> None:
|
2022-12-12 21:28:27 +00:00
|
|
|
"""Test config entry diagnostics."""
|
2023-08-22 07:31:31 +00:00
|
|
|
assert (
|
|
|
|
await get_diagnostics_for_config_entry(hass, hass_client, config_entry)
|
|
|
|
== snapshot
|
|
|
|
)
|