mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +00:00
Do not raise on multi-request errors on child devices (#949)
This will avoid crashing when some commands return an error on multi-requests on child devices. Idea from https://github.com/python-kasa/python-kasa/pull/900/files#r1624803457
This commit is contained in:
@@ -181,8 +181,9 @@ async def test_childdevicewrapper_multiplerequest_error(dummy_protocol, mocker):
|
||||
}
|
||||
wrapped_protocol = _ChildProtocolWrapper("dummyid", dummy_protocol)
|
||||
mocker.patch.object(wrapped_protocol._transport, "send", return_value=mock_response)
|
||||
with pytest.raises(KasaException):
|
||||
await wrapped_protocol.query(DUMMY_QUERY)
|
||||
res = await wrapped_protocol.query(DUMMY_QUERY)
|
||||
assert res["get_device_info"] == {"foo": "bar"}
|
||||
assert res["invalid_command"] == SmartErrorCode(-1001)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("list_sum", [5, 10, 30])
|
||||
|
Reference in New Issue
Block a user