mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-15 03:48:01 +00:00
match names to cli
This commit is contained in:
@@ -65,8 +65,20 @@ async def test_smart_device_from_value():
|
||||
assert DeviceType.from_value(name.value) is not None
|
||||
|
||||
assert DeviceType.from_value("nonexistent") is DeviceType.Unknown
|
||||
assert DeviceType.from_value("Plug") is DeviceType.Plug
|
||||
assert DeviceType.Plug.value == "Plug"
|
||||
assert DeviceType.from_value("plug") is DeviceType.Plug
|
||||
assert DeviceType.Plug.value == "plug"
|
||||
|
||||
assert DeviceType.from_value("bulb") is DeviceType.Bulb
|
||||
assert DeviceType.Bulb.value == "bulb"
|
||||
|
||||
assert DeviceType.from_value("dimmer") is DeviceType.Dimmer
|
||||
assert DeviceType.Dimmer.value == "dimmer"
|
||||
|
||||
assert DeviceType.from_value("strip") is DeviceType.Strip
|
||||
assert DeviceType.Strip.value == "strip"
|
||||
|
||||
assert DeviceType.from_value("lightstrip") is DeviceType.LightStrip
|
||||
assert DeviceType.LightStrip.value == "lightstrip"
|
||||
|
||||
|
||||
async def test_query_helper(dev):
|
||||
|
Reference in New Issue
Block a user