mirror of
https://github.com/home-assistant/core.git
synced 2025-06-09 15:47:09 +00:00

* decrease uptime accuracy from seconds to minutes * adjust tests * calc uptime timestamp in coordinator * bump pyipp to 0.17.0 * revert changes, just use the new printer.booted_at property --------- Co-authored-by: Chris Talkington <chris@talkingtontech.com>
25 lines
762 B
Python
25 lines
762 B
Python
"""Tests for the diagnostics data provided by the Internet Printing Protocol (IPP) integration."""
|
|
|
|
import pytest
|
|
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
|
|
|
|
|
|
@pytest.mark.freeze_time("2019-11-11 09:10:32+00:00")
|
|
async def test_diagnostics(
|
|
hass: HomeAssistant,
|
|
hass_client: ClientSessionGenerator,
|
|
init_integration: MockConfigEntry,
|
|
snapshot: SnapshotAssertion,
|
|
) -> None:
|
|
"""Test diagnostics for config entry."""
|
|
assert (
|
|
await get_diagnostics_for_config_entry(hass, hass_client, init_integration)
|
|
== snapshot
|
|
)
|