| 448 | |
| 449 | |
| 450 | def test_pay_plugin(node_factory): |
| 451 | l1, l2 = node_factory.line_graph(2) |
| 452 | inv = l2.rpc.invoice(123000, 'label', 'description', 3700) |
| 453 | |
| 454 | res = l1.rpc.pay(bolt11=inv['bolt11']) |
| 455 | assert res['status'] == 'complete' |
| 456 | |
| 457 | with pytest.raises(RpcError, match=r'missing required parameter'): |
| 458 | l1.rpc.call('pay') |
| 459 | |
| 460 | # Make sure usage messages are present. |
| 461 | msg = 'pay invstring [amount_msat] [label] [riskfactor] [maxfeepercent] '\ |
| 462 | '[retry_for] [maxdelay] [exemptfee] [localinvreqid] [exclude] '\ |
| 463 | '[maxfee] [description] [partial_msat]' |
| 464 | # We run with --developer: |
| 465 | msg += ' [dev_use_shadow]' |
| 466 | assert only_one(l1.rpc.help('pay')['help'])['command'] == msg |
| 467 | |
| 468 | |
| 469 | def test_keysend_plugin(node_factory): |