pytest: test that we maintain load order unless hook deps require a change.

Suggested-by: @mschmook
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-11-02 13:08:01 +10:30
committed by neil saitug
parent 852e14c947
commit d429e21db3
3 changed files with 55 additions and 0 deletions

15
tests/plugins/dep_e.py Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env python3
from pyln.client import Plugin
"""A simple plugin that registers an htlc_accepted hook..
"""
plugin = Plugin()
@plugin.hook('htlc_accepted')
def on_htlc_accepted(htlc, plugin, **kwargs):
print("htlc_accepted called")
return {'result': 'continue'}
plugin.run()