aboutsummaryrefslogtreecommitdiff
path: root/test/functional/net.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/net.py')
-rwxr-xr-xtest/functional/net.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/functional/net.py b/test/functional/net.py
index 3ba3764cf9..16e4f6adb4 100755
--- a/test/functional/net.py
+++ b/test/functional/net.py
@@ -12,15 +12,13 @@ import time
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
- assert_raises_jsonrpc,
+ assert_raises_rpc_error,
connect_nodes_bi,
p2p_port,
)
-
class NetTest(BitcoinTestFramework):
- def __init__(self):
- super().__init__()
+ def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 2
@@ -85,8 +83,8 @@ class NetTest(BitcoinTestFramework):
added_nodes = self.nodes[0].getaddednodeinfo(ip_port)
assert_equal(len(added_nodes), 1)
assert_equal(added_nodes[0]['addednode'], ip_port)
- # check that a non-existant node returns an error
- assert_raises_jsonrpc(-24, "Node has not been added",
+ # check that a non-existent node returns an error
+ assert_raises_rpc_error(-24, "Node has not been added",
self.nodes[0].getaddednodeinfo, '1.1.1.1')
def _test_getpeerinfo(self):