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

Function test_plugin_connect_notifications

tests/test_plugin.py:420–431  ·  view source on GitHub ↗

test 'connect' and 'disconnect' notifications

(node_factory)

Source from the content-addressed store, hash-verified

418
419
420def test_plugin_connect_notifications(node_factory):
421 """ test 'connect' and 'disconnect' notifications
422 """
423 l1, l2 = node_factory.get_nodes(2, opts={'plugin': os.path.join(os.getcwd(), 'contrib/plugins/helloworld.py')})
424
425 l1.connect(l2)
426 l1.daemon.wait_for_log(r'Received connect event')
427 l2.daemon.wait_for_log(r'Received connect event')
428
429 l2.rpc.disconnect(l1.info['id'])
430 l1.daemon.wait_for_log(r'Received disconnect event')
431 l2.daemon.wait_for_log(r'Received disconnect event')
432
433
434def test_failing_plugins(directory):

Callers

nothing calls this directly

Calls 5

get_nodesMethod · 0.80
joinMethod · 0.80
wait_for_logMethod · 0.80
connectMethod · 0.45
disconnectMethod · 0.45

Tested by

no test coverage detected