mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Migrate iot cloud module to mashumaro (#1282)
Breaking change as the CloudInfo interface is changing to snake case for consistency with the rest of the library.
This commit is contained in:
@@ -125,6 +125,7 @@ CLOUD_MODULE = {
|
||||
"username": "",
|
||||
"server": "devs.tplinkcloud.com",
|
||||
"binded": 0,
|
||||
"err_code": 0,
|
||||
"cld_connection": 0,
|
||||
"illegalType": -1,
|
||||
"stopConnect": -1,
|
||||
|
13
tests/iot/modules/test_cloud.py
Normal file
13
tests/iot/modules/test_cloud.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from kasa import Device, Module
|
||||
|
||||
from ...device_fixtures import device_iot
|
||||
|
||||
|
||||
@device_iot
|
||||
def test_cloud(dev: Device):
|
||||
cloud = dev.modules.get(Module.IotCloud)
|
||||
assert cloud
|
||||
info = cloud.info
|
||||
assert info
|
||||
assert isinstance(info.provisioned, int)
|
||||
assert cloud.is_connected == bool(info.cloud_connected)
|
Reference in New Issue
Block a user