pytest: custommsg chainable tests

This commit is contained in:
Michael Schmoock
2021-01-27 12:56:29 +01:00
committed by Rusty Russell
parent 4e8d3f395b
commit 67f2939540
3 changed files with 33 additions and 9 deletions

16
tests/plugins/custommsg_a.py Executable file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env python3
from pyln.client import Plugin
plugin = Plugin()
@plugin.hook('custommsg')
def on_custommsg(peer_id, message, plugin, **kwargs):
plugin.log("Got custommessage_a {msg} from peer {peer_id}".format(
msg=message,
peer_id=peer_id
))
return {'result': 'continue'}
plugin.run()