diff options
author | Jon Atack <jon@atack.com> | 2019-10-28 11:11:20 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2019-11-24 23:08:38 +0100 |
commit | 33f5fc32e5bfbe1e89c4d20ce455bcc6dc194151 (patch) | |
tree | 541a9905f6291d56b1227e21827ebaaa100ca15a /test/functional/test_framework/wallet_util.py | |
parent | 0f3539ac6d772fc646b5f184fa1efe77bf632f6a (diff) | |
download | bitcoin-33f5fc32e5bfbe1e89c4d20ce455bcc6dc194151.tar.xz |
test: add rpc getaddressinfo labels test coverage
Diffstat (limited to 'test/functional/test_framework/wallet_util.py')
-rwxr-xr-x | test/functional/test_framework/wallet_util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/test_framework/wallet_util.py b/test/functional/test_framework/wallet_util.py index c0dfa4c3f0..3d81a61120 100755 --- a/test/functional/test_framework/wallet_util.py +++ b/test/functional/test_framework/wallet_util.py @@ -88,6 +88,11 @@ def get_multisig(node): p2sh_p2wsh_script=CScript([OP_HASH160, witness_script, OP_EQUAL]).hex(), p2sh_p2wsh_addr=script_to_p2sh_p2wsh(script_code)) +def labels_value(name="", purpose="receive"): + """Generate a getaddressinfo labels array from a name and purpose. + Often used as the value of a labels kwarg for calling test_address below.""" + return [{"name": name, "purpose": purpose}] + def test_address(node, address, **kwargs): """Get address info for `address` and test whether the returned values are as expected.""" addr_info = node.getaddressinfo(address) |