tests: fix error in websocket_client fixture
A jsonrpc request is a notification when no ID is present. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
348d45e87c
commit
81f2418d78
|
@ -86,7 +86,7 @@ class WebsocketClient:
|
||||||
req_id: Optional[int] = resp.get("id")
|
req_id: Optional[int] = resp.get("id")
|
||||||
method: Optional[str] = resp.get("method")
|
method: Optional[str] = resp.get("method")
|
||||||
if method is not None:
|
if method is not None:
|
||||||
if req_id is not None:
|
if req_id is None:
|
||||||
params = resp.get("params", [])
|
params = resp.get("params", [])
|
||||||
if not isinstance(params, list):
|
if not isinstance(params, list):
|
||||||
pytest.fail("jsonrpc notification params"
|
pytest.fail("jsonrpc notification params"
|
||||||
|
|
Loading…
Reference in New Issue