test: add listlabels test in wallet_labels.py

This commit is contained in:
Jon Atack 2019-10-28 14:54:41 +01:00
parent 1388de8390
commit 0f3539ac6d
No known key found for this signature in database
GPG Key ID: 4F5721B3D0E3921D

View File

@ -152,14 +152,13 @@ class Label:
def verify(self, node):
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)
assert self.name in node.listlabels()
assert_equal(
node.getaddressesbylabel(self.name),
{address: {"purpose": self.purpose[address]} for address in self.addresses})