summaryrefslogtreecommitdiff
path: root/test/module
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-26 18:25:21 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-26 18:25:21 +0200
commit3d836c372d7eff1e2b507888f1ff652a30187c54 (patch)
tree7712d75d400a48124192e2967fab4d8fcc72063c /test/module
parent0157537cc049d4b13384b7042129a61f297f9132 (diff)
checking on RPC status and sending it thru
Diffstat (limited to 'test/module')
-rwxr-xr-xtest/module/test.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/module/test.py b/test/module/test.py
index 9146c14..b9e7059 100755
--- a/test/module/test.py
+++ b/test/module/test.py
@@ -1,7 +1,8 @@
import importlib.util
-spec = importlib.util.spec_from_file_location("module.name", "../../rpc/__main__.py")
-CortexRPC = importlib.util.module_from_spec(spec)
-spec.loader.exec_module(CortexRPC)
+spec = importlib.util.spec_from_file_location("CortexRPC", "../../rpc/rpc.py")
+rpc_module = importlib.util.module_from_spec(spec)
+spec.loader.exec_module(rpc_module)
+CortexRPC = rpc_module.CortexRPC
if __name__ == '__main__':
def get_params(key, value):
@@ -10,7 +11,7 @@ if __name__ == '__main__':
def set_param(key, value):
print('log param. {}: {}'.format(key, value))
return 'ok'
- def ready:
+ def ready(key):
return 'ready'
def process_cmd(cmd, payload):
print('process command', cmd, payload)