aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_invalid_address_message.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/rpc_invalid_address_message.py')
-rwxr-xr-xtest/functional/rpc_invalid_address_message.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/functional/rpc_invalid_address_message.py b/test/functional/rpc_invalid_address_message.py
index 452f857a44..0c29efb85a 100755
--- a/test/functional/rpc_invalid_address_message.py
+++ b/test/functional/rpc_invalid_address_message.py
@@ -95,15 +95,19 @@ class InvalidAddressErrorMessageTest(BitcoinTestFramework):
self.check_invalid(INVALID_ADDRESS, 'Not a valid Bech32 or Base58 encoding')
self.check_invalid(INVALID_ADDRESS_2, 'Not a valid Bech32 or Base58 encoding')
+ node = self.nodes[0]
+
+ # Missing arg returns the help text
+ assert_raises_rpc_error(-1, "Return information about the given bitcoin address.", node.validateaddress)
+ # Explicit None is not allowed for required parameters
+ assert_raises_rpc_error(-3, "JSON value of type null is not of expected type string", node.validateaddress, None)
+
def test_getaddressinfo(self):
node = self.nodes[0]
assert_raises_rpc_error(-5, "Invalid Bech32 address data size", node.getaddressinfo, BECH32_INVALID_SIZE)
-
assert_raises_rpc_error(-5, "Not a valid Bech32 or Base58 encoding", node.getaddressinfo, BECH32_INVALID_PREFIX)
-
assert_raises_rpc_error(-5, "Invalid prefix for Base58-encoded address", node.getaddressinfo, BASE58_INVALID_PREFIX)
-
assert_raises_rpc_error(-5, "Not a valid Bech32 or Base58 encoding", node.getaddressinfo, INVALID_ADDRESS)
def run_test(self):