mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +01:00
pytest: add notifications to tests.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
16
tests/plugins/notify2.py
Executable file
16
tests/plugins/notify2.py
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from pyln.client import Plugin
|
||||
|
||||
plugin = Plugin()
|
||||
|
||||
|
||||
@plugin.method("call_make_notify")
|
||||
def call_make_notify(plugin, request, **kwargs):
|
||||
plugin.notify_message(request, "Starting notification", level='debug')
|
||||
plugin.notify_progress(request, 0, 2)
|
||||
plugin.notify_progress(request, 1, 2)
|
||||
return plugin.rpc.call('make_notify')
|
||||
|
||||
|
||||
plugin.run()
|
||||
Reference in New Issue
Block a user