From 78672738ff2be40b1fea575e71eaa0592d26a7d7 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 17 Jan 2018 13:35:19 +1030 Subject: [PATCH] test_lightningd.py: remove deprecated APIs. Individual tests can always re-enable them, though. [ More test fallout fixes by Christian Decker ] Signed-off-by: Rusty Russell --- tests/test_lightningd.py | 16 ++++++++-------- tests/utils.py | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index 1ebbbad58..1019a5451 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -675,10 +675,10 @@ class LightningDTests(BaseLightningDTests): # FIXME: test paying via another node, should fail to pay twice. p1 = l1.rpc.getpeer(l2.info['id'], 'info') p2 = l2.rpc.getpeer(l1.info['id'], 'info') - assert p1['msatoshi_to_us'] == 10**6 * 1000 - assert p1['msatoshi_total'] == 10**6 * 1000 - assert p2['msatoshi_to_us'] == 0 - assert p2['msatoshi_total'] == 10**6 * 1000 + assert p1['channels'][0]['msatoshi_to_us'] == 10**6 * 1000 + assert p1['channels'][0]['msatoshi_total'] == 10**6 * 1000 + assert p2['channels'][0]['msatoshi_to_us'] == 0 + assert p2['channels'][0]['msatoshi_total'] == 10**6 * 1000 # This works. preimage2 = l1.rpc.sendpay(to_json([routestep]), rhash) @@ -690,10 +690,10 @@ class LightningDTests(BaseLightningDTests): time.sleep(1) p1 = l1.rpc.getpeer(l2.info['id'], 'info') p2 = l2.rpc.getpeer(l1.info['id'], 'info') - assert p1['msatoshi_to_us'] == 10**6 * 1000 - amt - assert p1['msatoshi_total'] == 10**6 * 1000 - assert p2['msatoshi_to_us'] == amt - assert p2['msatoshi_total'] == 10**6 * 1000 + assert p1['channels'][0]['msatoshi_to_us'] == 10**6 * 1000 - amt + assert p1['channels'][0]['msatoshi_total'] == 10**6 * 1000 + assert p2['channels'][0]['msatoshi_to_us'] == amt + assert p2['channels'][0]['msatoshi_total'] == 10**6 * 1000 # Repeat will "succeed", but won't actually send anything (duplicate) assert not l1.daemon.is_in_log('... succeeded') diff --git a/tests/utils.py b/tests/utils.py index bee2b2dba..8604c50b3 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -249,6 +249,7 @@ class LightningD(TailableProc): '--bitcoin-datadir={}'.format(bitcoin_dir), '--lightning-dir={}'.format(lightning_dir), '--port={}'.format(port), + '--deprecated-apis=false', '--override-fee-rates=15000/7500/1000', '--network=regtest', '--ignore-fee-limits=false'