diff options
author | MarcoFalke <falke.marco@gmail.com> | 2017-11-22 11:31:32 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-11-22 11:31:35 -0500 |
commit | 3d6ad407770e13958e157bf026cae0bfb9254899 (patch) | |
tree | d1bae9d536b63e7fc54f6bf08089b808227119c1 | |
parent | 5ea932a51083837cdd27715e10a3a0d5d553af24 (diff) | |
parent | fa61c6f6a6fda3e68f3f84d27bcc996af861bcfd (diff) |
Merge #11743: qa: Add multiwallet prefix test
fa61c6f6a qa: Add multiwallet prefix test (MarcoFalke)
Pull request description:
Fixes https://github.com/bitcoin/bitcoin/pull/10849#discussion_r127847938
Tree-SHA512: 7967be04e76d935398b3bea60c864ffc9e38dbb4cfb55890bb146a6f16c28d81ca5d89736275e2d0b03642806f6f7093beeea979f5257c464f437c4e5a9684f1
-rwxr-xr-x | test/functional/multiwallet.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/functional/multiwallet.py b/test/functional/multiwallet.py index 4a721d1109..06409b6f31 100755 --- a/test/functional/multiwallet.py +++ b/test/functional/multiwallet.py @@ -16,10 +16,10 @@ class MultiWalletTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 - self.extra_args = [['-wallet=w1', '-wallet=w2', '-wallet=w3']] + self.extra_args = [['-wallet=w1', '-wallet=w2', '-wallet=w3', '-wallet=w']] def run_test(self): - assert_equal(set(self.nodes[0].listwallets()), {"w1", "w2", "w3"}) + assert_equal(set(self.nodes[0].listwallets()), {"w1", "w2", "w3", "w"}) self.stop_node(0) @@ -66,6 +66,7 @@ class MultiWalletTest(BitcoinTestFramework): w1 = self.nodes[0].get_wallet_rpc("w1") w2 = self.nodes[0].get_wallet_rpc("w2") w3 = self.nodes[0].get_wallet_rpc("w3") + w4 = self.nodes[0].get_wallet_rpc("w") wallet_bad = self.nodes[0].get_wallet_rpc("bad") w1.generate(1) @@ -91,18 +92,22 @@ class MultiWalletTest(BitcoinTestFramework): w3_name = w3.getwalletinfo()['walletname'] assert_equal(w3_name, "w3") - assert_equal({"w1", "w2", "w3"}, {w1_name, w2_name, w3_name}) + w4_name = w4.getwalletinfo()['walletname'] + assert_equal(w4_name, "w") w1.generate(101) assert_equal(w1.getbalance(), 100) assert_equal(w2.getbalance(), 0) assert_equal(w3.getbalance(), 0) + assert_equal(w4.getbalance(), 0) w1.sendtoaddress(w2.getnewaddress(), 1) w1.sendtoaddress(w3.getnewaddress(), 2) + w1.sendtoaddress(w4.getnewaddress(), 3) w1.generate(1) assert_equal(w2.getbalance(), 1) assert_equal(w3.getbalance(), 2) + assert_equal(w4.getbalance(), 3) batch = w1.batch([w1.getblockchaininfo.get_request(), w1.getwalletinfo.get_request()]) assert_equal(batch[0]["result"]["chain"], "regtest") |