From 81f2418d78d8400e16d2a7900abe0fdd35889e27 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Sun, 20 Feb 2022 11:01:26 -0500 Subject: [PATCH] tests: fix error in websocket_client fixture A jsonrpc request is a notification when no ID is present. Signed-off-by: Eric Callahan --- tests/fixtures/websocket_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fixtures/websocket_client.py b/tests/fixtures/websocket_client.py index 34d5110..ccb126d 100644 --- a/tests/fixtures/websocket_client.py +++ b/tests/fixtures/websocket_client.py @@ -86,7 +86,7 @@ class WebsocketClient: req_id: Optional[int] = resp.get("id") method: Optional[str] = resp.get("method") if method is not None: - if req_id is not None: + if req_id is None: params = resp.get("params", []) if not isinstance(params, list): pytest.fail("jsonrpc notification params"