2022-01-27 11:35:41 +13:00
|
|
|
"""Tests for the diagnostics data provided by the ESPHome integration."""
|
2023-08-24 01:01:58 +02:00
|
|
|
from syrupy import SnapshotAssertion
|
2022-01-27 11:35:41 +13:00
|
|
|
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
2023-02-02 22:29:57 +01:00
|
|
|
from tests.typing import ClientSessionGenerator
|
2022-01-27 11:35:41 +13:00
|
|
|
|
|
|
|
|
|
|
|
async def test_diagnostics(
|
2022-11-27 09:59:37 -10:00
|
|
|
hass: HomeAssistant,
|
2023-02-02 22:29:57 +01:00
|
|
|
hass_client: ClientSessionGenerator,
|
2022-11-27 09:59:37 -10:00
|
|
|
init_integration: MockConfigEntry,
|
2023-02-13 09:45:11 +01:00
|
|
|
enable_bluetooth: None,
|
2023-01-18 15:15:37 -05:00
|
|
|
mock_dashboard,
|
2023-08-24 01:01:58 +02:00
|
|
|
snapshot: SnapshotAssertion,
|
2023-02-13 09:45:11 +01:00
|
|
|
) -> None:
|
2022-01-27 11:35:41 +13:00
|
|
|
"""Test diagnostics for config entry."""
|
|
|
|
result = await get_diagnostics_for_config_entry(hass, hass_client, init_integration)
|
|
|
|
|
2023-08-24 01:01:58 +02:00
|
|
|
assert result == snapshot
|