From b142f79ddb91a44f29fcb2afb7f2edf3ca17e168 Mon Sep 17 00:00:00 2001 From: lsilva01 Date: Tue, 24 Aug 2021 19:42:13 -0300 Subject: [PATCH 1/2] skip test_getaddressinfo() if wallet is disabled --- test/functional/rpc_invalid_address_message.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/functional/rpc_invalid_address_message.py b/test/functional/rpc_invalid_address_message.py index e362642f0fa3a..4eb7c2d651acc 100755 --- a/test/functional/rpc_invalid_address_message.py +++ b/test/functional/rpc_invalid_address_message.py @@ -29,9 +29,6 @@ def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 - def skip_test_if_missing_module(self): - self.skip_if_no_wallet() - def test_validateaddress(self): node = self.nodes[0] @@ -87,7 +84,10 @@ def test_getaddressinfo(self): def run_test(self): self.test_validateaddress() - self.test_getaddressinfo() + + if self.is_wallet_compiled(): + self.init_wallet(0) + self.test_getaddressinfo() if __name__ == '__main__': From c2fbdca54915e85ffafe1a88858d3c70c2b1afe8 Mon Sep 17 00:00:00 2001 From: lsilva01 Date: Wed, 8 Sep 2021 18:05:09 -0300 Subject: [PATCH 2/2] Add BECH32_INVALID_VERSION test --- test/functional/rpc_invalid_address_message.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/functional/rpc_invalid_address_message.py b/test/functional/rpc_invalid_address_message.py index 4eb7c2d651acc..7ab5a5e90d45b 100755 --- a/test/functional/rpc_invalid_address_message.py +++ b/test/functional/rpc_invalid_address_message.py @@ -57,6 +57,10 @@ def test_validateaddress(self): assert info['isvalid'] assert 'error' not in info + info = node.validateaddress(BECH32_INVALID_VERSION) + assert not info['isvalid'] + assert_equal(info['error'], 'Invalid Bech32 address witness version') + # Base58 info = node.validateaddress(BASE58_INVALID_PREFIX) assert not info['isvalid']