aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_multiwallet.py
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2020-11-21 18:57:22 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2020-11-24 05:33:18 +0000
commit89bdad5b25ae4ac03a486f729a5b58ae6f21946d (patch)
treeeba42cc542d1d060d50013936f0d60930967ef32 /test/functional/wallet_multiwallet.py
parentb1f59d55d920d2b35269b474762f94fec87bfb16 (diff)
downloadbitcoin-89bdad5b25ae4ac03a486f729a5b58ae6f21946d.tar.xz
RPC/Wallet: unloadwallet: Allow specifying wallet_name param matching RPC endpoint
Diffstat (limited to 'test/functional/wallet_multiwallet.py')
-rwxr-xr-xtest/functional/wallet_multiwallet.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/functional/wallet_multiwallet.py b/test/functional/wallet_multiwallet.py
index 0d715b3130..eeaa607db7 100755
--- a/test/functional/wallet_multiwallet.py
+++ b/test/functional/wallet_multiwallet.py
@@ -355,13 +355,18 @@ class MultiWalletTest(BitcoinTestFramework):
assert_raises_rpc_error(-1, "JSON value is not a string as expected", self.nodes[0].unloadwallet)
assert_raises_rpc_error(-18, "Requested wallet does not exist or is not loaded", self.nodes[0].unloadwallet, "dummy")
assert_raises_rpc_error(-18, "Requested wallet does not exist or is not loaded", node.get_wallet_rpc("dummy").unloadwallet)
- assert_raises_rpc_error(-8, "Both the RPC endpoint wallet and wallet_name parameter were provided (only one allowed)", w1.unloadwallet, "w2"),
- assert_raises_rpc_error(-8, "Both the RPC endpoint wallet and wallet_name parameter were provided (only one allowed)", w1.unloadwallet, "w1"),
+ assert_raises_rpc_error(-8, "RPC endpoint wallet and wallet_name parameter specify different wallets", w1.unloadwallet, "w2"),
# Successfully unload the specified wallet name
self.nodes[0].unloadwallet("w1")
assert 'w1' not in self.nodes[0].listwallets()
+ # Unload w1 again, this time providing the wallet name twice
+ self.nodes[0].loadwallet("w1")
+ assert 'w1' in self.nodes[0].listwallets()
+ w1.unloadwallet("w1")
+ assert 'w1' not in self.nodes[0].listwallets()
+
# Successfully unload the wallet referenced by the request endpoint
# Also ensure unload works during walletpassphrase timeout
w2.encryptwallet('test')