2022-01-26 14:48:38 +00:00
|
|
|
"""Test WattTime diagnostics."""
|
2023-08-27 14:19:15 +00:00
|
|
|
from syrupy import SnapshotAssertion
|
|
|
|
from syrupy.filters import props
|
|
|
|
|
2023-02-17 15:34:53 +00:00
|
|
|
from homeassistant.core import HomeAssistant
|
2022-01-26 14:48:38 +00:00
|
|
|
|
|
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
2023-02-17 15:34:53 +00:00
|
|
|
from tests.typing import ClientSessionGenerator
|
2022-01-26 14:48:38 +00:00
|
|
|
|
|
|
|
|
2023-02-17 15:34:53 +00:00
|
|
|
async def test_entry_diagnostics(
|
|
|
|
hass: HomeAssistant,
|
|
|
|
config_entry,
|
|
|
|
hass_client: ClientSessionGenerator,
|
|
|
|
setup_watttime,
|
2023-08-27 14:19:15 +00:00
|
|
|
snapshot: SnapshotAssertion,
|
2023-02-17 15:34:53 +00:00
|
|
|
) -> None:
|
2022-01-26 14:48:38 +00:00
|
|
|
"""Test config entry diagnostics."""
|
2023-08-27 14:19:15 +00:00
|
|
|
assert await get_diagnostics_for_config_entry(
|
|
|
|
hass, hass_client, config_entry
|
|
|
|
) == snapshot(exclude=props("entry_id"))
|