From 218875a38dc1d59d16d526a0372928ed20ebbbfa Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Fri, 13 Aug 2021 16:18:08 +0200 Subject: [PATCH] adding check for the deprecated api. Signed-off-by: Vincenzo Palazzo --- tests/test_gossip.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/test_gossip.py b/tests/test_gossip.py index 7325d6fdb32f..64110ef68dcc 100644 --- a/tests/test_gossip.py +++ b/tests/test_gossip.py @@ -1975,7 +1975,14 @@ def test_parms_listforwards(node_factory): it is simple and not useful, but it is good to have to avoid simile errors in the future. """ - l1, _ = node_factory.line_graph(2) + l1, l2 = node_factory.line_graph(2) + + l2.stop() + l2.daemon.opts['allow-deprecated-apis'] = True + l2.start() + + forwards_new = l1.rpc.listforwards("settled")["forwards"] + forwards_dep = l2.rpc.call("listforwards", {"in_channel": "0x1x2", "out_channel": "0x2x3", "status": "settled"})["forwards"] - forwards = l1.rpc.listforwards("settled")["forwards"] - assert len(forwards) == 0 + assert len(forwards_new) == 0 + assert len(forwards_dep) == 0