2022-10-13 13:31:33 +00:00
|
|
|
"""Test AirNow diagnostics."""
|
2023-08-21 12:19:21 +00:00
|
|
|
from syrupy import SnapshotAssertion
|
|
|
|
|
2023-02-09 15:09:13 +00:00
|
|
|
from homeassistant.core import HomeAssistant
|
2022-10-13 13:31:33 +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-10-13 13:31:33 +00:00
|
|
|
|
|
|
|
|
2023-02-09 15:09:13 +00:00
|
|
|
async def test_entry_diagnostics(
|
2023-08-21 12:19:21 +00:00
|
|
|
hass: HomeAssistant,
|
|
|
|
config_entry,
|
|
|
|
hass_client: ClientSessionGenerator,
|
|
|
|
setup_airnow,
|
|
|
|
snapshot: SnapshotAssertion,
|
2023-02-09 15:09:13 +00:00
|
|
|
) -> None:
|
2022-10-13 13:31:33 +00:00
|
|
|
"""Test config entry diagnostics."""
|
2023-10-05 11:24:28 +00:00
|
|
|
assert await hass.config_entries.async_setup(config_entry.entry_id)
|
2023-08-21 12:19:21 +00:00
|
|
|
assert (
|
|
|
|
await get_diagnostics_for_config_entry(hass, hass_client, config_entry)
|
|
|
|
== snapshot
|
|
|
|
)
|