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/wallet_labels.py | |
parent | 0f3539ac6d772fc646b5f184fa1efe77bf632f6a (diff) |
test: add rpc getaddressinfo labels test coverage
Diffstat (limited to 'test/functional/wallet_labels.py')
-rwxr-xr-x | test/functional/wallet_labels.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/test/functional/wallet_labels.py b/test/functional/wallet_labels.py index 2af8d2abac..27371d43bb 100755 --- a/test/functional/wallet_labels.py +++ b/test/functional/wallet_labels.py @@ -13,6 +13,10 @@ from collections import defaultdict from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error +from test_framework.wallet_util import ( + labels_value, + test_address, +) class WalletLabelsTest(BitcoinTestFramework): def set_test_params(self): @@ -153,11 +157,12 @@ class Label: if self.receive_address is not None: assert self.receive_address in self.addresses for address in self.addresses: - assert_equal( - node.getaddressinfo(address)['labels'][0], - {"name": self.name, - "purpose": self.purpose[address]}) - assert_equal(node.getaddressinfo(address)['label'], self.name) + test_address( + node, + address, + label=self.name, + labels=labels_value(name=self.name, purpose=self.purpose[address]) + ) assert self.name in node.listlabels() assert_equal( node.getaddressesbylabel(self.name), |