Changeset View
Changeset View
Standalone View
Standalone View
test/functional/multiwallet.py
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
w1 = self.nodes[0] / "wallet/w1" | w1 = self.nodes[0] / "wallet/w1" | ||||
w1.generate(1) | w1.generate(1) | ||||
# accessing invalid wallet fails | # accessing invalid wallet fails | ||||
assert_raises_jsonrpc(-18, "Requested wallet does not exist or is not loaded", | assert_raises_jsonrpc(-18, "Requested wallet does not exist or is not loaded", | ||||
(self.nodes[0] / "wallet/bad").getwalletinfo) | (self.nodes[0] / "wallet/bad").getwalletinfo) | ||||
# accessing wallet RPC without using wallet endpoint fails | # accessing wallet RPC without using wallet endpoint fails | ||||
assert_raises_jsonrpc(-19, "Wallet file not specified", | assert_raises_jsonrpc(-19, "Wallet file not specified (must request wallet RPC through /wallet/<filename> uri-path).", | ||||
self.nodes[0].getwalletinfo) | self.nodes[0].getwalletinfo) | ||||
# check w1 wallet balance | # check w1 wallet balance | ||||
w1_info = w1.getwalletinfo() | w1_info = w1.getwalletinfo() | ||||
assert_equal(w1_info['immature_balance'], 50) | assert_equal(w1_info['immature_balance'], 50) | ||||
w1_name = w1_info['walletname'] | w1_name = w1_info['walletname'] | ||||
assert_equal(w1_name, "w1") | assert_equal(w1_name, "w1") | ||||
Show All 27 Lines |