[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
This commit is contained in:
1 parent
baf6b4e3f9
commit
5d536619ab
8 files changed
+78
-126
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user