mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-12 10:28:01 +00:00
Add childsetup module to smartcam hubs (#1469)
Add the `childsetup` module for `smartcam` hubs to allow pairing and unpairing child devices.
This commit is contained in:
@@ -191,12 +191,12 @@ async def test_feature_setters(dev: Device, mocker: MockerFixture):
|
||||
exceptions = []
|
||||
for feat in dev.features.values():
|
||||
try:
|
||||
prot = (
|
||||
feat.container._device.protocol
|
||||
if feat.container
|
||||
else feat.device.protocol
|
||||
)
|
||||
with patch.object(prot, "query", name=feat.id) as query:
|
||||
patch_dev = feat.container._device if feat.container else feat.device
|
||||
with (
|
||||
patch.object(patch_dev.protocol, "query", name=feat.id) as query,
|
||||
# patch update in case feature setter does an update
|
||||
patch.object(patch_dev, "update"),
|
||||
):
|
||||
await _test_feature(feat, query)
|
||||
# we allow our own exceptions to avoid mocking valid responses
|
||||
except KasaException:
|
||||
|
Reference in New Issue
Block a user