aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_import_with_label.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/wallet_import_with_label.py')
-rwxr-xr-xtest/functional/wallet_import_with_label.py31
1 files changed, 22 insertions, 9 deletions
diff --git a/test/functional/wallet_import_with_label.py b/test/functional/wallet_import_with_label.py
index 2a9051b1e8..e356fce469 100755
--- a/test/functional/wallet_import_with_label.py
+++ b/test/functional/wallet_import_with_label.py
@@ -11,7 +11,10 @@ with and without a label.
"""
from test_framework.test_framework import BitcoinTestFramework
-from test_framework.wallet_util import test_address
+from test_framework.wallet_util import (
+ labels_value,
+ test_address,
+)
class ImportWithLabel(BitcoinTestFramework):
@@ -36,7 +39,8 @@ class ImportWithLabel(BitcoinTestFramework):
address,
iswatchonly=True,
ismine=False,
- label=label)
+ label=label,
+ labels=labels_value(name=label))
self.log.info(
"Import the watch-only address's private key without a "
@@ -47,7 +51,8 @@ class ImportWithLabel(BitcoinTestFramework):
test_address(self.nodes[1],
address,
- label=label)
+ label=label,
+ labels=labels_value(name=label))
self.log.info(
"Test importaddress without label and importprivkey with label."
@@ -59,7 +64,8 @@ class ImportWithLabel(BitcoinTestFramework):
address2,
iswatchonly=True,
ismine=False,
- label="")
+ label="",
+ labels=labels_value())
self.log.info(
"Import the watch-only address's private key with a "
@@ -71,7 +77,8 @@ class ImportWithLabel(BitcoinTestFramework):
test_address(self.nodes[1],
address2,
- label=label2)
+ label=label2,
+ labels=labels_value(name=label2))
self.log.info("Test importaddress with label and importprivkey with label.")
self.log.info("Import a watch-only address with a label.")
@@ -82,7 +89,8 @@ class ImportWithLabel(BitcoinTestFramework):
address3,
iswatchonly=True,
ismine=False,
- label=label3_addr)
+ label=label3_addr,
+ labels=labels_value(name=label3_addr))
self.log.info(
"Import the watch-only address's private key with a "
@@ -94,7 +102,8 @@ class ImportWithLabel(BitcoinTestFramework):
test_address(self.nodes[1],
address3,
- label=label3_priv)
+ label=label3_priv,
+ labels=labels_value(name=label3_priv))
self.log.info(
"Test importprivkey won't label new dests with the same "
@@ -109,6 +118,7 @@ class ImportWithLabel(BitcoinTestFramework):
iswatchonly=True,
ismine=False,
label=label4_addr,
+ labels=labels_value(name=label4_addr),
embedded=None)
self.log.info(
@@ -123,10 +133,13 @@ class ImportWithLabel(BitcoinTestFramework):
test_address(self.nodes[1],
embedded_addr,
- label="")
+ label="",
+ labels=labels_value())
+
test_address(self.nodes[1],
address4,
- label=label4_addr)
+ label=label4_addr,
+ labels=labels_value(name=label4_addr))
self.stop_nodes()