File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -926,10 +926,16 @@ def test_pay(self):
926
926
927
927
inv = l2 .rpc .invoice (123000 , 'test_pay' , 'description' )['bolt11' ]
928
928
before = int (time .time ())
929
- preimage = l1 .rpc .pay (inv )
929
+ details = l1 .rpc .pay (inv )
930
930
after = int (time .time ())
931
- invoice = l2 .rpc .listinvoices ('test_pay' )['invoices' ][0 ]
931
+ preimage = details ['payment_preimage' ]
932
+ assert details ['status' ] == 'complete'
933
+ assert details ['msatoshi' ] == 123000
934
+ assert details ['destination' ] == l2 .info ['id' ]
935
+ assert details ['created_at' ] >= before
936
+ assert details ['created_at' ] <= after
932
937
938
+ invoice = l2 .rpc .listinvoices ('test_pay' )['invoices' ][0 ]
933
939
assert invoice ['status' ] == 'paid'
934
940
assert invoice ['paid_at' ] >= before
935
941
assert invoice ['paid_at' ] <= after
@@ -957,7 +963,7 @@ def test_pay(self):
957
963
958
964
# Test listpayments indexed by bolt11.
959
965
assert len (l1 .rpc .listpayments (inv )['payments' ]) == 1
960
- assert l1 .rpc .listpayments (inv )['payments' ][0 ]['payment_preimage' ] == preimage [ 'payment_preimage' ]
966
+ assert l1 .rpc .listpayments (inv )['payments' ][0 ]['payment_preimage' ] == preimage
961
967
962
968
def test_pay_optional_args (self ):
963
969
l1 , l2 = self .connect ()
You can’t perform that action at this time.
0 commit comments