66from simple_rpc .cli import _describe_method , rpc_call , rpc_list
77from simple_rpc .extras import json_utf8_decode , json_utf8_encode
88
9- from conf import _devices , _interface
9+ from . conf import _devices , _interface
1010
1111
1212def test_json_utf8_encode () -> None :
@@ -36,7 +36,7 @@ def test_describe_method() -> None:
3636def test_rpc_list () -> None :
3737 handle = StringIO ()
3838
39- rpc_list (handle , _devices ['serial' ], 9600 , 1 , None )
39+ rpc_list (handle , _devices ['serial' ], 9600 , 2 , None )
4040 assert 'ping data\n Echo a value.\n ' in handle .getvalue ()
4141
4242
@@ -45,7 +45,7 @@ def test_rpc_list_save() -> None:
4545 handle = StringIO ()
4646 iface_handle = StringIO ()
4747
48- rpc_list (handle , _devices ['serial' ], 9600 , 1 , iface_handle )
48+ rpc_list (handle , _devices ['serial' ], 9600 , 2 , iface_handle )
4949 iface_handle .seek (0 )
5050 device = load (iface_handle , Loader = FullLoader )
5151 assert device ['methods' ]['ping' ]['doc' ] == 'Echo a value.'
@@ -55,7 +55,7 @@ def test_rpc_list_save() -> None:
5555def test_rpc_call () -> None :
5656 handle = StringIO ()
5757
58- rpc_call (handle , _devices ['serial' ], 9600 , 1 , None , 'ping' , ['10' ])
58+ rpc_call (handle , _devices ['serial' ], 9600 , 2 , None , 'ping' , ['10' ])
5959 assert handle .getvalue () == '10\n '
6060
6161
@@ -65,7 +65,7 @@ def test_rpc_call_load() -> None:
6565 iface_handle = StringIO (_interface )
6666
6767 rpc_call (
68- handle , _devices ['serial' ], 9600 , 1 , iface_handle , 'ping' , ['10' ])
68+ handle , _devices ['serial' ], 9600 , 2 , iface_handle , 'ping' , ['10' ])
6969 assert handle .getvalue () == '10\n '
7070
7171
@@ -76,7 +76,7 @@ def test_rpc_call_load_() -> None:
7676
7777 try :
7878 rpc_call (
79- handle , _devices ['serial' ], 9600 , 1 , iface_handle , 'inc' , ['1' ])
79+ handle , _devices ['serial' ], 9600 , 2 , iface_handle , 'inc' , ['1' ])
8080 except ValueError as error :
8181 assert str (error ) == 'invalid method name: inc'
8282 else :
0 commit comments