mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 08:04:26 +01:00
pytest: Check description of newly created invoices
This commit is contained in:
committed by
Rusty Russell
parent
b55d03cb30
commit
6dae525c07
@@ -59,6 +59,8 @@ changes.
|
|||||||
to be compatible with eclair and lnd (#1730).
|
to be compatible with eclair and lnd (#1730).
|
||||||
- JSON API: `listnodes`: now correctly prints `addresses` if more than
|
- JSON API: `listnodes`: now correctly prints `addresses` if more than
|
||||||
one is advertised.
|
one is advertised.
|
||||||
|
- Failing tests no longer delete the test directory, to allow easier debugging
|
||||||
|
(Issue: #1599)
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
|
|||||||
@@ -445,14 +445,16 @@ class LightningDTests(BaseLightningDTests):
|
|||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
l1.rpc.autocleaninvoice(cycle_seconds=8, expired_by=2)
|
l1.rpc.autocleaninvoice(cycle_seconds=8, expired_by=2)
|
||||||
|
|
||||||
l1.rpc.invoice(msatoshi=12300, label='inv1', description='1', expiry=4)
|
l1.rpc.invoice(msatoshi=12300, label='inv1', description='description1', expiry=4)
|
||||||
l1.rpc.invoice(msatoshi=12300, label='inv2', description='2', expiry=12)
|
l1.rpc.invoice(msatoshi=12300, label='inv2', description='description2', expiry=12)
|
||||||
|
|
||||||
# time 0
|
# time 0
|
||||||
# Both should still be there.
|
# Both should still be there.
|
||||||
assert len(l1.rpc.listinvoices('inv1')['invoices']) == 1
|
assert len(l1.rpc.listinvoices('inv1')['invoices']) == 1
|
||||||
assert len(l1.rpc.listinvoices('inv2')['invoices']) == 1
|
assert len(l1.rpc.listinvoices('inv2')['invoices']) == 1
|
||||||
|
|
||||||
|
assert l1.rpc.listinvoices('inv1')['invoices'][0]['description'] == 'description1'
|
||||||
|
|
||||||
time.sleep(start_time - time.time() + 6) # total 6
|
time.sleep(start_time - time.time() + 6) # total 6
|
||||||
# Both should still be there - auto clean cycle not started.
|
# Both should still be there - auto clean cycle not started.
|
||||||
# inv1 should be expired
|
# inv1 should be expired
|
||||||
|
|||||||
Reference in New Issue
Block a user