mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +00:00
Add support for pairing devices with hubs (#859)
Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
This commit is contained in:
@@ -74,7 +74,7 @@ def test_feature_value_container(mocker, dummy_feature: Feature):
|
||||
def test_prop(self):
|
||||
return "dummy"
|
||||
|
||||
dummy_feature.container = DummyContainer()
|
||||
dummy_feature.container = DummyContainer() # type: ignore[assignment]
|
||||
dummy_feature.attribute_getter = "test_prop"
|
||||
|
||||
mock_dev_prop = mocker.patch.object(
|
||||
@@ -191,7 +191,12 @@ async def test_feature_setters(dev: Device, mocker: MockerFixture):
|
||||
exceptions = []
|
||||
for feat in dev.features.values():
|
||||
try:
|
||||
with patch.object(feat.device.protocol, "query") as query:
|
||||
prot = (
|
||||
feat.container._device.protocol
|
||||
if feat.container
|
||||
else feat.device.protocol
|
||||
)
|
||||
with patch.object(prot, "query", name=feat.id) as query:
|
||||
await _test_feature(feat, query)
|
||||
# we allow our own exceptions to avoid mocking valid responses
|
||||
except KasaException:
|
||||
|
Reference in New Issue
Block a user