test_lightningd.py: Test 0-msatoshi pay

Based-on-patch-by: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-01-21 13:28:29 +10:30 committed by Christian Decker
parent 45665a994b
commit f03dbde354

View File

@ -806,6 +806,9 @@ class LightningDTests(BaseLightningDTests):
# Must provide an amount!
self.assertRaises(ValueError, l1.rpc.pay, inv2)
self.assertRaises(ValueError, l1.rpc.pay, inv2, None)
# Amount must be nonzero!
self.assertRaisesRegex(ValueError, 'WIRE_AMOUNT_BELOW_MINIMUM',
l1.rpc.pay, inv2, 0)
l1.rpc.pay(inv2, random.randint(1000, 999999))
# Should see 6 completed payments