Browse Source

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 <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
parent
commit
78672738ff
  1. 16
      tests/test_lightningd.py
  2. 1
      tests/utils.py

16
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')

1
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'

Loading…
Cancel
Save