MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_websocket_no_rune

Function test_websocket_no_rune

tests/test_clnrest.py:314–325  ·  view source on GitHub ↗

Test websocket with default values for options.

(node_factory)

Source from the content-addressed store, hash-verified

312
313
314def test_websocket_no_rune(node_factory):
315 """Test websocket with default values for options."""
316 # start a node with clnrest
317 l1, base_url, ca_cert = start_node_with_clnrest(node_factory)
318
319 # http session
320 http_session = http_session_with_retry()
321 http_session.verify = ca_cert.as_posix()
322
323 # no rune provided => no websocket connection and no notification received
324 notifications = notifications_received_via_websocket(l1, base_url, http_session, expect_error="Missing rune")
325 assert len(notifications) == 0
326
327
328def test_websocket_wrong_rune(node_factory):

Callers

nothing calls this directly

Calls 3

start_node_with_clnrestFunction · 0.85
http_session_with_retryFunction · 0.85

Tested by

no test coverage detected