MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_pay_variants

Function test_pay_variants

tests/test_pay.py:1782–1798  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

1780
1781
1782def test_pay_variants(node_factory):
1783 l1, l2 = node_factory.line_graph(2)
1784
1785 # Upper case is allowed
1786 b11 = l2.rpc.invoice(123000, 'test_pay_variants upper', 'description')['bolt11'].upper()
1787 l1.rpc.decode(b11)
1788 l1.rpc.pay(b11)
1789
1790 # lightning: prefix is allowed
1791 b11 = 'lightning:' + l2.rpc.invoice(123000, 'test_pay_variants with prefix', 'description')['bolt11']
1792 l1.rpc.decode(b11)
1793 l1.rpc.pay(b11)
1794
1795 # BOTH is allowed.
1796 b11 = 'LIGHTNING:' + l2.rpc.invoice(123000, 'test_pay_variants upper with prefix', 'description')['bolt11'].upper()
1797 l1.rpc.decode(b11)
1798 l1.rpc.pay(b11)
1799
1800
1801@pytest.mark.slow_test

Callers

nothing calls this directly

Calls 4

line_graphMethod · 0.80
invoiceMethod · 0.45
decodeMethod · 0.45
payMethod · 0.45

Tested by

no test coverage detected