From 9030e5d779b1ce0471dec096d1cd29ffe2bc9702 Mon Sep 17 00:00:00 2001 From: darosior Date: Fri, 31 Jan 2020 12:50:37 +0100 Subject: [PATCH] pytest plugins: use the standard 'no operation' syntax for hooks --- tests/plugins/dblog.py | 2 +- tests/plugins/hold_invoice.py | 2 +- tests/plugins/reject_some_invoices.py | 2 +- tests/plugins/rpc_command.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/plugins/dblog.py b/tests/plugins/dblog.py index ba2f40a9a533..85a0ade61638 100755 --- a/tests/plugins/dblog.py +++ b/tests/plugins/dblog.py @@ -47,7 +47,7 @@ def db_write(plugin, writes, **kwargs): plugin.conn.execute("COMMIT;") - return True + return {"result": "continue"} plugin.add_option('dblog-file', None, 'The db file to create.') diff --git a/tests/plugins/hold_invoice.py b/tests/plugins/hold_invoice.py index ebdcf418c2b0..b3190db5e336 100755 --- a/tests/plugins/hold_invoice.py +++ b/tests/plugins/hold_invoice.py @@ -11,7 +11,7 @@ @plugin.hook('invoice_payment') def on_payment(payment, plugin, **kwargs): time.sleep(float(plugin.get_option('holdtime'))) - return {} + return {'result': 'continue'} plugin.add_option('holdtime', '10', 'The time to hold invoice for.') diff --git a/tests/plugins/reject_some_invoices.py b/tests/plugins/reject_some_invoices.py index c6f8822e9de5..c326b58298ed 100755 --- a/tests/plugins/reject_some_invoices.py +++ b/tests/plugins/reject_some_invoices.py @@ -20,7 +20,7 @@ def on_payment(payment, plugin, **kwargs): WIRE_TEMPORARY_NODE_FAILURE = 0x2002 return {'failure_code': WIRE_TEMPORARY_NODE_FAILURE} - return {} + return {'result': 'continue'} plugin.run() diff --git a/tests/plugins/rpc_command.py b/tests/plugins/rpc_command.py index dc73f3815ce3..5ff12b08ce5d 100755 --- a/tests/plugins/rpc_command.py +++ b/tests/plugins/rpc_command.py @@ -24,7 +24,7 @@ def on_rpc_command(plugin, rpc_command, **kwargs): elif request["method"] == "help": request["method"] = "autocleaninvoice" return {"replace": request} - return {"continue": True} + return {"result": "continue"} plugin.run()