Add KL130 fixture, initial lightstrip tests (#214)

This commit is contained in:
Teemu R
2021-09-24 22:26:21 +02:00
committed by GitHub
parent acb221b1e0
commit f1b28e79b9
2 changed files with 102 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
from kasa import DeviceType, SmartLightStrip
from .conftest import lightstrip, pytestmark
@lightstrip
async def test_lightstrip_length(dev: SmartLightStrip):
assert dev.is_light_strip
assert dev.device_type == DeviceType.LightStrip
assert dev.length == dev.sys_info["length"]
@lightstrip
async def test_lightstrip_effect(dev: SmartLightStrip):
assert isinstance(dev.effect, dict)
for k in ["brightness", "custom", "enable", "id", "name"]:
assert k in dev.effect