Test websocket with default values for options.
(node_factory)
| 360 | |
| 361 | |
| 362 | def test_websocket_rune_readonly(node_factory): |
| 363 | """Test websocket with default values for options.""" |
| 364 | # start a node with clnrest |
| 365 | l1, base_url, ca_cert = start_node_with_clnrest(node_factory) |
| 366 | |
| 367 | # http session |
| 368 | http_session = http_session_with_retry() |
| 369 | http_session.verify = ca_cert.as_posix() |
| 370 | |
| 371 | # readonly rune provided => websocket connection and notifications received |
| 372 | rune_readonly = l1.rpc.createrune(restrictions="readonly")['rune'] |
| 373 | http_session.headers.update({"rune": rune_readonly}) |
| 374 | notifications = notifications_received_via_websocket(l1, base_url, http_session) |
| 375 | assert len([n for n in notifications if not n.get('invoice_creation') is None]) == 1 |
| 376 | |
| 377 | |
| 378 | def test_websocket_rune_listnotifications(node_factory): |
nothing calls this directly
no test coverage detected