aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_listreceivedby.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-04-24 14:50:00 -0500
committerJohn Newbery <john@johnnewbery.com>2018-05-02 17:53:23 -0400
commit5d536619abda745c298fd827a856df775f223241 (patch)
treee7fabb22764c621d95777a4009ec35044afe3d9d /test/functional/wallet_listreceivedby.py
parentbaf6b4e3f956e5a612aa2385660e7c020f2c5c39 (diff)
downloadbitcoin-5d536619abda745c298fd827a856df775f223241.tar.xz
[tests] Remove 'account' API from wallet functional tests
Removes usage of account API from the following functional tests: - wallet_listreceivedby.py - wallet_basic.py - wallet_keypool_topup.py - wallet_txn_clone.py - wallet_listsinceblock.py - wallet_import_rescan.py - wallet_listtransactions.py - wallet_txn_doublespend.py
Diffstat (limited to 'test/functional/wallet_listreceivedby.py')
-rwxr-xr-xtest/functional/wallet_listreceivedby.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/wallet_listreceivedby.py b/test/functional/wallet_listreceivedby.py
index e0e20cc9a3..7447211296 100755
--- a/test/functional/wallet_listreceivedby.py
+++ b/test/functional/wallet_listreceivedby.py
@@ -14,7 +14,6 @@ from test_framework.util import (assert_array_result,
class ReceivedByTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
- self.extra_args = [['-deprecatedrpc=accounts']] * 2
def run_test(self):
# Generate block to get out of IBD
@@ -112,8 +111,9 @@ class ReceivedByTest(BitcoinTestFramework):
self.log.info("listreceivedbylabel + getreceivedbylabel Test")
# set pre-state
+ label = ''
address = self.nodes[1].getnewaddress()
- label = self.nodes[1].getaccount(address)
+ assert_equal(self.nodes[1].getaddressinfo(address)['label'], 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)
@@ -141,7 +141,8 @@ class ReceivedByTest(BitcoinTestFramework):
assert_equal(balance, balance_by_label + Decimal("0.1"))
# Create a new label named "mynewlabel" that has a 0 balance
- self.nodes[1].getlabeladdress(label="mynewlabel", force=True)
+ address = self.nodes[1].getnewaddress()
+ self.nodes[1].setlabel(address, "mynewlabel")
received_by_label_json = [r for r in self.nodes[1].listreceivedbylabel(0, True) if r["label"] == "mynewlabel"][0]
# Test includeempty of listreceivedbylabel