mirror of https://github.com/home-assistant/core
25 lines
776 B
Python
25 lines
776 B
Python
"""Test Jellyfin diagnostics."""
|
|
|
|
from syrupy import SnapshotAssertion
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from tests.common import MockConfigEntry
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
|
from tests.typing import ClientSessionGenerator
|
|
|
|
|
|
async def test_diagnostics(
|
|
hass: HomeAssistant,
|
|
init_integration: MockConfigEntry,
|
|
hass_client: ClientSessionGenerator,
|
|
snapshot: SnapshotAssertion,
|
|
) -> None:
|
|
"""Test generating diagnostics for a config entry."""
|
|
data = await get_diagnostics_for_config_entry(hass, hass_client, init_integration)
|
|
|
|
assert data["entry"]["data"]["client_device_id"] == init_integration.entry_id
|
|
data["entry"]["data"]["client_device_id"] = "entry-id"
|
|
|
|
assert data == snapshot
|