diff --git a/tests/test_connection.py b/tests/test_connection.py index 523b90c1a..e82a5ec7b 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -186,7 +186,7 @@ def test_connection_moved(node_factory, executor): log = l1.daemon.wait_for_log('listening for connections') match = re.search(r'on port (\d*)', log) assert match and len(match.groups()) == 1 - hang_port = match.groups()[0] + hang_port = int(match.groups()[0]) # Attempt connection fut_hang = executor.submit(l1.rpc.connect, l2.info['id'], diff --git a/tests/test_invoices.py b/tests/test_invoices.py index 8052a2e06..bb90f1d10 100644 --- a/tests/test_invoices.py +++ b/tests/test_invoices.py @@ -15,7 +15,7 @@ def test_invoice(node_factory, chainparams): addr1 = l2.rpc.newaddr('bech32')['bech32'] addr2 = l2.rpc.newaddr('p2sh-segwit')['p2sh-segwit'] before = int(time.time()) - inv = l1.rpc.invoice(123000, 'label', 'description', '3700', [addr1, addr2]) + inv = l1.rpc.invoice(123000, 'label', 'description', 3700, [addr1, addr2]) after = int(time.time()) b11 = l1.rpc.decodepay(inv['bolt11']) assert b11['currency'] == chainparams['bip173_prefix'] @@ -55,7 +55,7 @@ def test_invoice(node_factory, chainparams): assert 'warning_capacity' in inv # Test cltv option. - inv = l1.rpc.invoice(123000, 'label3', 'description', '3700', cltv=99) + inv = l1.rpc.invoice(123000, 'label3', 'description', 3700, cltv=99) b11 = l1.rpc.decodepay(inv['bolt11']) assert b11['min_final_cltv_expiry'] == 99 diff --git a/tests/test_pay.py b/tests/test_pay.py index 3a23372e9..678f83f5b 100644 --- a/tests/test_pay.py +++ b/tests/test_pay.py @@ -364,7 +364,7 @@ def test_pay_optional_args(node_factory, compat): # root of a payment tree with the bolt11 invoice). anyinv = l2.rpc.invoice('any', 'any_pay', 'desc')['bolt11'] - l1.dev_pay(anyinv, label='desc', msatoshi='500', use_shadow=False) + l1.dev_pay(anyinv, label='desc', msatoshi=500, use_shadow=False) payment3 = l1.rpc.listsendpays(anyinv)['payments'] assert len(payment3) == 1 assert payment3[0]['label'] == 'desc' @@ -539,7 +539,7 @@ def test_pay_maxfee_shadow(node_factory): # maxfeepercent. amount = 20000 bolt11 = l2.rpc.invoice(amount, "big.{}".format(i), "bigger")["bolt11"] - pay_status = l1.rpc.pay(bolt11, maxfeepercent="0.000001") + pay_status = l1.rpc.pay(bolt11, maxfeepercent=0.001) assert pay_status["amount_msat"] == Millisatoshi(amount) @@ -5220,7 +5220,7 @@ def test_pay_manual_exclude(node_factory, bitcoind): chan23 = l2.rpc.listpeers(l3_id)['peers'][0]['channels'][0] scid12 = chan12['short_channel_id'] + '/' + str(chan12['direction']) scid23 = chan23['short_channel_id'] + '/' + str(chan23['direction']) - inv = l3.rpc.invoice(msatoshi='123000', label='label1', description='desc')['bolt11'] + inv = l3.rpc.invoice(msatoshi=123000, label='label1', description='desc')['bolt11'] # Exclude the payer node id with pytest.raises(RpcError, match=r'Payer is manually excluded'): l1.rpc.pay(inv, exclude=[l1_id])