Skip to content

Commit 58620a4

Browse files
nepetcdecker
authored andcommitted
tests: Fix tests broken by TrampolineError migration
Signed-off-by: Peter Neuroth <[email protected]>
1 parent 0983f5b commit 58620a4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libs/gl-client-py/tests/test_plugin.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from gltesting.fixtures import *
22
from pyln.testing.utils import wait_for
33
from pyln import grpc as clnpb
4+
import grpc
45
import pytest
56
import secrets
67
from pathlib import Path
@@ -92,7 +93,7 @@ def test_trampoline_pay(bitcoind, clients, node_factory):
9293

9394
res = n1.trampoline_pay(inv["bolt11"], bytes.fromhex(l2.info["id"]))
9495
assert res
95-
assert len(res.payment_hash) == 32 # There was a confusion about hex/bytes return.
96+
assert len(res.payment_hash) == 32 # There was a confusion about hex/bytes return.
9697

9798
l2.rpc.unsetchecks()
9899

@@ -124,7 +125,9 @@ def test_trampoline_pay(bitcoind, clients, node_factory):
124125

125126
# calling `trampoline_pay` with an unkown tmrp_node_id must fail.
126127
with pytest.raises(
127-
expected_exception=ValueError, match=r"Peer error: No such peer"
128+
expected_exception=ValueError,
129+
130+
match=f"Unknown peer {l3.info['id']}",
128131
):
129132
res = n1.trampoline_pay(inv["bolt11"], bytes.fromhex(l3.info["id"]))
130133

@@ -134,13 +137,10 @@ def test_trampoline_pay(bitcoind, clients, node_factory):
134137
# trampoline payments must fail.
135138
with pytest.raises(
136139
expected_exception=ValueError,
137-
match=r"Features \\\"[a-f0-9]+\\\" do not contain feature bit 427",
140+
match="Peer doesn't suport trampoline payments",
138141
):
139142
res = n1.trampoline_pay(inv["bolt11"], bytes.fromhex(l3.info["id"]))
140143

141-
res = n1.listpays()
142-
print(f"LISTPAYS: {res}")
143-
144144

145145
def test_trampoline_multi_htlc(bitcoind, clients, node_factory):
146146
c1 = clients.new()

0 commit comments

Comments
 (0)