Files
python-kasa/tests/iot/modules/test_schedule.py
ZeliardM da2588291d tests: add type annotations to IoT tests (#1685)
Add type annotations to all test functions across 8 files in `tests/iot/`, improving type safety and enabling mypy to check function bodies.
2026-07-05 18:31:48 +02:00

19 lines
563 B
Python

import pytest
from kasa import Device, Module
from kasa.iot.modules.rulemodule import Action, TimeOption
from ...device_fixtures import device_iot
@device_iot
@pytest.mark.xdist_group(name="caplog")
def test_schedule(dev: Device, caplog: pytest.LogCaptureFixture) -> None:
schedule = dev.modules.get(Module.IotSchedule)
assert schedule
if rules := schedule.rules:
first = rules[0]
assert isinstance(first.sact, Action)
assert isinstance(first.stime_opt, TimeOption)
assert "Unable to read rule list" not in caplog.text