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

Function test_websocket_unrestricted_rune

tests/test_clnrest.py:346–359  ·  view source on GitHub ↗

Test websocket with default values for options.

(node_factory)

Source from the content-addressed store, hash-verified

344
345
346def test_websocket_unrestricted_rune(node_factory):
347 """Test websocket with default values for options."""
348 # start a node with clnrest
349 l1, base_url, ca_cert = start_node_with_clnrest(node_factory)
350
351 # http session
352 http_session = http_session_with_retry()
353 http_session.verify = ca_cert.as_posix()
354
355 # unrestricted rune provided => websocket connection and notifications received
356 rune_unrestricted = l1.rpc.createrune()['rune']
357 http_session.headers.update({"rune": rune_unrestricted})
358 notifications = notifications_received_via_websocket(l1, base_url, http_session)
359 assert len([n for n in notifications if not n.get('invoice_creation') is None]) == 1
360
361
362def test_websocket_rune_readonly(node_factory):

Callers

nothing calls this directly

Calls 5

start_node_with_clnrestFunction · 0.85
http_session_with_retryFunction · 0.85
updateMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected