test: remove getaddressinfo label tests

This commit is contained in:
Jon Atack 2019-11-25 01:31:38 +01:00
parent c7654af6f8
commit dc0cabeda4
No known key found for this signature in database
GPG Key ID: 4F5721B3D0E3921D
5 changed files with 8 additions and 14 deletions

View File

@ -392,7 +392,7 @@ class WalletTest(BitcoinTestFramework):
for label in [u'рыба', u'𝅘𝅥𝅯']:
addr = self.nodes[0].getnewaddress()
self.nodes[0].setlabel(addr, label)
test_address(self.nodes[0], addr, label=label, labels=[label])
test_address(self.nodes[0], addr, labels=[label])
assert label in self.nodes[0].listlabels()
self.nodes[0].rpc.ensure_ascii = True # restore to default

View File

@ -36,7 +36,6 @@ class ImportWithLabel(BitcoinTestFramework):
address,
iswatchonly=True,
ismine=False,
label=label,
labels=[label])
self.log.info(
@ -45,7 +44,7 @@ class ImportWithLabel(BitcoinTestFramework):
)
priv_key = self.nodes[0].dumpprivkey(address)
self.nodes[1].importprivkey(priv_key)
test_address(self.nodes[1], address, label=label, labels=[label])
test_address(self.nodes[1], address, labels=[label])
self.log.info(
"Test importaddress without label and importprivkey with label."
@ -57,7 +56,6 @@ class ImportWithLabel(BitcoinTestFramework):
address2,
iswatchonly=True,
ismine=False,
label="",
labels=[""])
self.log.info(
@ -68,7 +66,7 @@ class ImportWithLabel(BitcoinTestFramework):
label2 = "Test Label 2"
self.nodes[1].importprivkey(priv_key2, label2)
test_address(self.nodes[1], address2, label=label2, labels=[label2])
test_address(self.nodes[1], address2, labels=[label2])
self.log.info("Test importaddress with label and importprivkey with label.")
self.log.info("Import a watch-only address with a label.")
@ -79,7 +77,6 @@ class ImportWithLabel(BitcoinTestFramework):
address3,
iswatchonly=True,
ismine=False,
label=label3_addr,
labels=[label3_addr])
self.log.info(
@ -90,7 +87,7 @@ class ImportWithLabel(BitcoinTestFramework):
label3_priv = "Test Label 3 for importprivkey"
self.nodes[1].importprivkey(priv_key3, label3_priv)
test_address(self.nodes[1], address3, label=label3_priv, labels=[label3_priv])
test_address(self.nodes[1], address3, labels=[label3_priv])
self.log.info(
"Test importprivkey won't label new dests with the same "
@ -104,7 +101,6 @@ class ImportWithLabel(BitcoinTestFramework):
address4,
iswatchonly=True,
ismine=False,
label=label4_addr,
labels=[label4_addr],
embedded=None)
@ -118,9 +114,9 @@ class ImportWithLabel(BitcoinTestFramework):
self.nodes[1].importprivkey(priv_key4)
embedded_addr = self.nodes[1].getaddressinfo(address4)['embedded']['address']
test_address(self.nodes[1], embedded_addr, label="", labels=[""])
test_address(self.nodes[1], embedded_addr, labels=[""])
test_address(self.nodes[1], address4, label=label4_addr, labels=[label4_addr])
test_address(self.nodes[1], address4, labels=[label4_addr])
self.stop_nodes()

View File

@ -569,7 +569,6 @@ class ImportMultiTest(BitcoinTestFramework):
key.p2sh_p2wpkh_addr,
solvable=True,
ismine=True,
label=p2sh_p2wpkh_label,
labels=[p2sh_p2wpkh_label])
# Test ranged descriptor fails if range is not specified
@ -641,7 +640,6 @@ class ImportMultiTest(BitcoinTestFramework):
key.p2pkh_addr,
solvable=True,
ismine=False,
label=p2pkh_label,
labels=[p2pkh_label])
# Test import fails if both desc and scriptPubKey are provided

View File

@ -155,7 +155,7 @@ class Label:
if self.receive_address is not None:
assert self.receive_address in self.addresses
for address in self.addresses:
test_address(node, address, label=self.name, labels=[self.name])
test_address(node, address, labels=[self.name])
assert self.name in node.listlabels()
assert_equal(
node.getaddressesbylabel(self.name),

View File

@ -128,7 +128,7 @@ class ReceivedByTest(BitcoinTestFramework):
# set pre-state
label = ''
address = self.nodes[1].getnewaddress()
test_address(self.nodes[1], address, label=label, labels=[label])
test_address(self.nodes[1], address, labels=[label])
received_by_label_json = [r for r in self.nodes[1].listreceivedbylabel() if r["label"] == label][0]
balance_by_label = self.nodes[1].getreceivedbylabel(label)