mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-20 11:40:13 +00:00
Initial support for tapos with child devices (#720)
* Add ChildDevice and ChildProtocolWrapper * Initialize & update children * Fix circular imports * Add dummy_protocol fixture and tests for unwrapping responseData * Use dummy_protocol for existing smartprotocol tests * Move _ChildProtocolWrapper to smartprotocol.py * Use dummy_protocol for test multiple requests * Use device_id instead of position for selecting the child * Fix wrapping for regular requests * Remove unused imports * tweak * rename child_device to childdevice * Fix import
This commit is contained in:
@@ -482,6 +482,9 @@ def _get_subclasses(of_class):
|
||||
"class_name_obj", _get_subclasses(BaseProtocol), ids=lambda t: t[0]
|
||||
)
|
||||
def test_protocol_init_signature(class_name_obj):
|
||||
if class_name_obj[0].startswith("_"):
|
||||
pytest.skip("Skipping internal protocols")
|
||||
return
|
||||
params = list(inspect.signature(class_name_obj[1].__init__).parameters.values())
|
||||
|
||||
assert len(params) == 2
|
||||
|
||||
Reference in New Issue
Block a user