1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00
Files
core/tests/components/firefly_iii/test_diagnostics.py
2025-10-18 18:02:50 +02:00

36 lines
1020 B
Python

"""Test the Firefly III component diagnostics."""
from unittest.mock import AsyncMock
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.core import HomeAssistant
from . import setup_integration
from tests.common import MockConfigEntry
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tests.typing import ClientSessionGenerator
async def test_get_config_entry_diagnostics(
hass: HomeAssistant,
snapshot: SnapshotAssertion,
mock_firefly_client: AsyncMock,
mock_config_entry: MockConfigEntry,
hass_client: ClientSessionGenerator,
) -> None:
"""Test if get_config_entry_diagnostics returns the correct data."""
await setup_integration(hass, mock_config_entry)
diagnostics_entry = await get_diagnostics_for_config_entry(
hass, hass_client, mock_config_entry
)
assert diagnostics_entry == snapshot(
exclude=props(
"created_at",
"modified_at",
)
)