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:
Christian Decker
2021-01-05 18:58:41 +01:00
parent 2981184fac
commit a1d33c3781
2 changed files with 56 additions and 4 deletions

View File

@@ -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)