Test the 'invoice_payment' notification
(node_factory)
| 1446 | |
| 1447 | |
| 1448 | def test_invoice_payment_notification(node_factory): |
| 1449 | """ |
| 1450 | Test the 'invoice_payment' notification |
| 1451 | """ |
| 1452 | opts = [{}, {"plugin": os.path.join(os.getcwd(), "contrib/plugins/helloworld.py")}] |
| 1453 | l1, l2 = node_factory.line_graph(2, opts=opts) |
| 1454 | |
| 1455 | msats = 12345 |
| 1456 | preimage = '1' * 64 |
| 1457 | label = "a_descriptive_label" |
| 1458 | inv1 = l2.rpc.invoice(msats, label, 'description', preimage=preimage) |
| 1459 | l1.dev_pay(inv1['bolt11'], dev_use_shadow=False) |
| 1460 | |
| 1461 | l2.daemon.wait_for_log(r"Received invoice_payment event for label {}," |
| 1462 | " preimage {}, and amount of {}" |
| 1463 | .format(label, preimage, msats)) |
| 1464 | |
| 1465 | |
| 1466 | def test_invoice_creation_notification(node_factory): |
nothing calls this directly
no test coverage detected