Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_multiwallet.py
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
self.nodes[0].assert_start_raises_init_error( | self.nodes[0].assert_start_raises_init_error( | ||||
['-wallet=w8_symlink'], r'Error: Invalid -wallet path \'w8_symlink\'\. .*') | ['-wallet=w8_symlink'], r'Error: Invalid -wallet path \'w8_symlink\'\. .*') | ||||
# should not initialize if the specified walletdir does not exist | # should not initialize if the specified walletdir does not exist | ||||
self.nodes[0].assert_start_raises_init_error( | self.nodes[0].assert_start_raises_init_error( | ||||
['-walletdir=bad'], 'Error: Specified -walletdir "bad" does not exist') | ['-walletdir=bad'], 'Error: Specified -walletdir "bad" does not exist') | ||||
# should not initialize if the specified walletdir is not a directory | # should not initialize if the specified walletdir is not a directory | ||||
not_a_dir = wallet_dir('notadir') | not_a_dir = wallet_dir('notadir') | ||||
open(not_a_dir, 'a').close() | open(not_a_dir, 'a', encoding="utf8").close() | ||||
self.nodes[0].assert_start_raises_init_error( | self.nodes[0].assert_start_raises_init_error( | ||||
['-walletdir=' + not_a_dir], 'Error: Specified -walletdir "' + re.escape(not_a_dir) + '" is not a directory') | ['-walletdir=' + not_a_dir], 'Error: Specified -walletdir "' + re.escape(not_a_dir) + '" is not a directory') | ||||
# if wallets/ doesn't exist, datadir should be the default wallet dir | # if wallets/ doesn't exist, datadir should be the default wallet dir | ||||
wallet_dir2 = data_dir('walletdir') | wallet_dir2 = data_dir('walletdir') | ||||
os.rename(wallet_dir(), wallet_dir2) | os.rename(wallet_dir(), wallet_dir2) | ||||
self.start_node(0, ['-wallet=w4', '-wallet=w5']) | self.start_node(0, ['-wallet=w4', '-wallet=w5']) | ||||
assert_equal(set(node.listwallets()), {"w4", "w5"}) | assert_equal(set(node.listwallets()), {"w4", "w5"}) | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |