mirror of
https://github.com/home-assistant/core.git
synced 2026-05-29 19:57:40 +01:00
fb132f8a26
* add diagnostics to bsblan * add device info check firmware. * add test for diagnostics * Update tests/components/bsblan/test_diagnostics.py Co-authored-by: Aarni Koskela <akx@iki.fi> * add fixture for diagnostics test Co-authored-by: Aarni Koskela <akx@iki.fi>
25 lines
667 B
Python
25 lines
667 B
Python
"""Tests for the diagnostics data provided by the BSBLan integration."""
|
|
import json
|
|
|
|
from aiohttp import ClientSession
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from tests.common import MockConfigEntry, load_fixture
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
|
|
|
|
|
async def test_diagnostics(
|
|
hass: HomeAssistant,
|
|
hass_client: ClientSession,
|
|
init_integration: MockConfigEntry,
|
|
):
|
|
"""Test diagnostics."""
|
|
|
|
diagnostics_fixture = json.loads(load_fixture("bsblan/diagnostics.json"))
|
|
|
|
assert (
|
|
await get_diagnostics_for_config_entry(hass, hass_client, init_integration)
|
|
== diagnostics_fixture
|
|
)
|