mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pytest: Add a test for listinvoices
We now have some more logic in the query, so let's test it exhaustively.
This commit is contained in:
@@ -875,12 +875,17 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
"""
|
||||
return self.call("listtransactions")
|
||||
|
||||
def listinvoices(self, label=None):
|
||||
"""
|
||||
Show invoice {label} (or all, if no {label)).
|
||||
def listinvoices(self, label=None, payment_hash=None, invstring=None):
|
||||
"""Query invoices
|
||||
|
||||
Show invoice matching {label} {payment_hash} or {invstring} (or
|
||||
all, if no filters are present).
|
||||
|
||||
"""
|
||||
payload = {
|
||||
"label": label
|
||||
"label": label,
|
||||
"payment_hash": payment_hash,
|
||||
"invstring": invstring,
|
||||
}
|
||||
return self.call("listinvoices", payload)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user