Test the 'invoice_payment' notification
(node_factory)
| 1530 | |
| 1531 | |
| 1532 | def test_invoice_payment_notification(node_factory): |
| 1533 | """ |
| 1534 | Test the 'invoice_payment' notification |
| 1535 | """ |
| 1536 | opts = [{}, {"plugin": os.path.join(os.getcwd(), "contrib/plugins/helloworld.py")}] |
| 1537 | l1, l2 = node_factory.line_graph(2, opts=opts) |
| 1538 | |
| 1539 | msats = 12345 |
| 1540 | preimage = '1' * 64 |
| 1541 | label = "a_descriptive_label" |
| 1542 | inv1 = l2.rpc.invoice(msats, label, 'description', preimage=preimage) |
| 1543 | l1.dev_pay(inv1['bolt11'], dev_use_shadow=False) |
| 1544 | |
| 1545 | l2.daemon.wait_for_log(r"Received invoice_payment event for label {}," |
| 1546 | " preimage {}, and amount of {}" |
| 1547 | .format(label, preimage, msats)) |
| 1548 | |
| 1549 | |
| 1550 | def test_invoice_creation_notification(node_factory): |
nothing calls this directly
no test coverage detected