MCPcopy Create free account
hub / github.com/ElementsProject/elements / test_address

Function test_address

test/functional/test_framework/wallet_util.py:123–131  ·  view source on GitHub ↗

Get address info for `address` and test whether the returned values are as expected.

(node, address, **kwargs)

Source from the content-addressed store, hash-verified

121 p2sh_p2wsh_addr=script_to_p2sh_p2wsh(script_code))
122
123def test_address(node, address, **kwargs):
124 """Get address info for `address` and test whether the returned values are as expected."""
125 addr_info = node.getaddressinfo(address)
126 for key, value in kwargs.items():
127 if value is None:
128 if key in addr_info.keys():
129 raise AssertionError("key {} unexpectedly returned in getaddressinfo.".format(key))
130 elif addr_info[key] != value:
131 raise AssertionError("key {} value {} did not match expected value {}".format(key, addr_info[key], value))
132
133def bytes_to_wif(b, compressed=True):
134 if compressed:

Callers 6

run_testMethod · 0.90
run_testMethod · 0.90
verifyMethod · 0.90
run_testMethod · 0.90
run_testMethod · 0.90
run_testMethod · 0.90

Calls 2

formatMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected