2022-01-21 15:39:21 +00:00
|
|
|
"""Tests for the diagnostics data provided by the TwenteMilieu integration."""
|
|
|
|
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
2023-02-02 21:29:57 +00:00
|
|
|
from tests.typing import ClientSessionGenerator
|
2022-01-21 15:39:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
async def test_diagnostics(
|
|
|
|
hass: HomeAssistant,
|
2023-02-02 21:29:57 +00:00
|
|
|
hass_client: ClientSessionGenerator,
|
2022-01-21 15:39:21 +00:00
|
|
|
init_integration: MockConfigEntry,
|
2023-02-17 15:40:46 +00:00
|
|
|
) -> None:
|
2022-01-21 15:39:21 +00:00
|
|
|
"""Test diagnostics."""
|
|
|
|
assert await get_diagnostics_for_config_entry(
|
|
|
|
hass, hass_client, init_integration
|
|
|
|
) == {
|
2023-01-07 13:52:06 +00:00
|
|
|
"WasteType.NON_RECYCLABLE": ["2021-11-01", "2021-12-01"],
|
|
|
|
"WasteType.ORGANIC": ["2021-11-02"],
|
|
|
|
"WasteType.PAPER": [],
|
|
|
|
"WasteType.TREE": ["2022-01-06"],
|
|
|
|
"WasteType.PACKAGES": ["2021-11-03"],
|
2022-01-21 15:39:21 +00:00
|
|
|
}
|