Test websocket with default values for options.
(node_factory)
| 392 | |
| 393 | |
| 394 | def test_websocket_rune_no_listnotifications(node_factory): |
| 395 | """Test websocket with default values for options.""" |
| 396 | # start a node with clnrest |
| 397 | l1, base_url, ca_cert = start_node_with_clnrest(node_factory) |
| 398 | |
| 399 | # http session |
| 400 | http_session = http_session_with_retry() |
| 401 | http_session.verify = ca_cert.as_posix() |
| 402 | |
| 403 | # with a rune which doesn't authorized listclnrest-notifications method => no websocket connection and no notification received |
| 404 | rune_no_clnrest_notifications = l1.rpc.createrune(restrictions=[["method/listclnrest-notifications"]])['rune'] |
| 405 | http_session.headers.update({"rune": rune_no_clnrest_notifications}) |
| 406 | notifications = notifications_received_via_websocket(l1, base_url, http_session, expect_error="Not permitted: method is equal to listclnrest-notifications") |
| 407 | assert len([n for n in notifications if n.find('invoice_creation') > 0]) == 0 |
| 408 | |
| 409 | |
| 410 | def test_numeric_msat_notification(node_factory): |
nothing calls this directly
no test coverage detected