From 5945b17c5eaf8eba3787ddee110272e37c0037a5 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Mon, 27 Jul 2026 15:53:35 -0400 Subject: [PATCH] python-client: fix test.py for current rpc_reader and PluginRemote APIs (#2087) test.py has drifted from the server code it exercises: RpcTransport implementations must provide writeSerialized (rpc.py no longer calls writeJSON), and PluginRemote.__init__ now takes a ClusterSetup as its first argument instead of the peer. Verified against a live scrypted server (connects and enumerates devices). Co-authored-by: Claude Fable 5 --- packages/python-client/test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/python-client/test.py b/packages/python-client/test.py index ce43a69ca..069fc009e 100644 --- a/packages/python-client/test.py +++ b/packages/python-client/test.py @@ -52,7 +52,7 @@ class EioRpcTransport(rpc_reader.RpcTransport): asyncio.run_coroutine_threadsafe(send(), self.loop) - def writeJSON(self, json, reject): + def writeSerialized(self, json, reject): return self.writeBuffer(json, reject) @@ -96,8 +96,9 @@ async def connect_scrypted_client( peer.params["print"] = print def callback(api, pluginId, hostInfo): + cluster_setup = plugin_remote.ClusterSetup(transport.loop, peer) remote = plugin_remote.PluginRemote( - peer, api, pluginId, hostInfo, transport.loop + cluster_setup, api, pluginId, hostInfo, transport.loop ) wrapped = remote.setSystemState