|
7 | 7 | import kasa |
8 | 8 | from kasa import Credentials, SmartDevice, SmartDeviceException |
9 | 9 | from kasa.smartdevice import DeviceType |
10 | | -from kasa.smartstrip import SmartStripPlug |
11 | 10 |
|
12 | 11 | from .conftest import handle_turn_on, has_emeter, no_emeter, turn_on |
13 | 12 | from .newfakes import PLUG_SCHEMA, TZ_SCHEMA, FakeTransportProtocol |
@@ -59,28 +58,6 @@ async def test_initial_update_no_emeter(dev, mocker): |
59 | 58 | assert spy.call_count == 2 |
60 | 59 |
|
61 | 60 |
|
62 | | -async def test_smart_device_from_value(): |
63 | | - """Make sure that every device type can be created from its value.""" |
64 | | - for name in DeviceType: |
65 | | - assert DeviceType.from_value(name.value) is not None |
66 | | - |
67 | | - assert DeviceType.from_value("nonexistent") is DeviceType.Unknown |
68 | | - assert DeviceType.from_value("plug") is DeviceType.Plug |
69 | | - assert DeviceType.Plug.value == "plug" |
70 | | - |
71 | | - assert DeviceType.from_value("bulb") is DeviceType.Bulb |
72 | | - assert DeviceType.Bulb.value == "bulb" |
73 | | - |
74 | | - assert DeviceType.from_value("dimmer") is DeviceType.Dimmer |
75 | | - assert DeviceType.Dimmer.value == "dimmer" |
76 | | - |
77 | | - assert DeviceType.from_value("strip") is DeviceType.Strip |
78 | | - assert DeviceType.Strip.value == "strip" |
79 | | - |
80 | | - assert DeviceType.from_value("lightstrip") is DeviceType.LightStrip |
81 | | - assert DeviceType.LightStrip.value == "lightstrip" |
82 | | - |
83 | | - |
84 | 61 | async def test_query_helper(dev): |
85 | 62 | with pytest.raises(SmartDeviceException): |
86 | 63 | await dev._query_helper("test", "testcmd", {}) |
|
0 commit comments