mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 10:17:51 +00:00
27 lines
843 B
Python
27 lines
843 B
Python
"""Tests the diagnostics for Home Assistant Backup integration."""
|
|
|
|
from syrupy import SnapshotAssertion
|
|
|
|
from homeassistant.components.backup.const import DOMAIN
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .common import setup_backup_integration
|
|
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
|
from tests.typing import ClientSessionGenerator
|
|
|
|
|
|
async def test_diagnostics(
|
|
hass: HomeAssistant,
|
|
hass_client: ClientSessionGenerator,
|
|
snapshot: SnapshotAssertion,
|
|
) -> None:
|
|
"""Test diagnostics."""
|
|
await setup_backup_integration(hass, with_hassio=False)
|
|
await hass.async_block_till_done(wait_background_tasks=True)
|
|
|
|
entry = hass.config_entries.async_entries(DOMAIN)[0]
|
|
diag_data = await get_diagnostics_for_config_entry(hass, hass_client, entry)
|
|
|
|
assert diag_data == snapshot
|