mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
test: add listlabels test in wallet_labels.py
This commit is contained in:
parent
1388de8390
commit
0f3539ac6d
@ -152,14 +152,13 @@ class Label:
|
|||||||
def verify(self, node):
|
def verify(self, node):
|
||||||
if self.receive_address is not None:
|
if self.receive_address is not None:
|
||||||
assert self.receive_address in self.addresses
|
assert self.receive_address in self.addresses
|
||||||
|
|
||||||
for address in self.addresses:
|
for address in self.addresses:
|
||||||
assert_equal(
|
assert_equal(
|
||||||
node.getaddressinfo(address)['labels'][0],
|
node.getaddressinfo(address)['labels'][0],
|
||||||
{"name": self.name,
|
{"name": self.name,
|
||||||
"purpose": self.purpose[address]})
|
"purpose": self.purpose[address]})
|
||||||
assert_equal(node.getaddressinfo(address)['label'], self.name)
|
assert_equal(node.getaddressinfo(address)['label'], self.name)
|
||||||
|
assert self.name in node.listlabels()
|
||||||
assert_equal(
|
assert_equal(
|
||||||
node.getaddressesbylabel(self.name),
|
node.getaddressesbylabel(self.name),
|
||||||
{address: {"purpose": self.purpose[address]} for address in self.addresses})
|
{address: {"purpose": self.purpose[address]} for address in self.addresses})
|
||||||
|
Loading…
Reference in New Issue
Block a user