mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-11-05 15:11:55 +00:00
Add KL130 fixture, initial lightstrip tests (#214)
This commit is contained in:
17
kasa/tests/test_lightstrip.py
Normal file
17
kasa/tests/test_lightstrip.py
Normal 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
|
||||
Reference in New Issue
Block a user