2022-01-21 06:09:36 +00:00
|
|
|
"""Test IQVIA diagnostics."""
|
2024-03-08 13:50:04 +00:00
|
|
|
|
2023-08-24 21:26:21 +00:00
|
|
|
from syrupy import SnapshotAssertion
|
|
|
|
|
2023-02-13 12:03:51 +00:00
|
|
|
from homeassistant.core import HomeAssistant
|
2022-10-11 16:13:58 +00:00
|
|
|
|
2024-07-08 10:57:19 +00:00
|
|
|
from tests.common import MockConfigEntry
|
2022-01-21 06:09:36 +00:00
|
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
2023-02-13 12:03:51 +00:00
|
|
|
from tests.typing import ClientSessionGenerator
|
2022-01-21 06:09:36 +00:00
|
|
|
|
|
|
|
|
2023-02-13 12:03:51 +00:00
|
|
|
async def test_entry_diagnostics(
|
2023-08-24 21:26:21 +00:00
|
|
|
hass: HomeAssistant,
|
2024-07-08 10:57:19 +00:00
|
|
|
config_entry: MockConfigEntry,
|
2023-08-24 21:26:21 +00:00
|
|
|
hass_client: ClientSessionGenerator,
|
2024-07-08 10:57:19 +00:00
|
|
|
setup_iqvia: None, # Needs to be injected after config_entry
|
2023-08-24 21:26:21 +00:00
|
|
|
snapshot: SnapshotAssertion,
|
2023-02-13 12:03:51 +00:00
|
|
|
) -> None:
|
2022-01-21 06:09:36 +00:00
|
|
|
"""Test config entry diagnostics."""
|
2023-08-24 21:26:21 +00:00
|
|
|
|
|
|
|
assert (
|
|
|
|
await get_diagnostics_for_config_entry(hass, hass_client, config_entry)
|
|
|
|
== snapshot
|
|
|
|
)
|