Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_multiwallet.py
Show All 27 Lines | def run_test(self): | ||||
wallet_dir = lambda *p: data_dir('wallets', *p) | wallet_dir = lambda *p: data_dir('wallets', *p) | ||||
def wallet(name): return node.get_wallet_rpc(name) | def wallet(name): return node.get_wallet_rpc(name) | ||||
assert_equal(set(node.listwallets()), {"w1", "w2", "w3", "w"}) | assert_equal(set(node.listwallets()), {"w1", "w2", "w3", "w"}) | ||||
self.stop_node(0) | self.stop_node(0) | ||||
self.assert_start_raises_init_error( | |||||
0, ['-walletdir=wallets'], 'Error: Specified -walletdir "wallets" does not exist') | |||||
self.assert_start_raises_init_error( | |||||
0, ['-walletdir=wallets'], 'Error: Specified -walletdir "wallets" is a relative path', cwd=data_dir()) | |||||
self.assert_start_raises_init_error( | |||||
0, ['-walletdir=debug.log'], 'Error: Specified -walletdir "debug.log" is not a directory', cwd=data_dir()) | |||||
# should not initialize if there are duplicate wallets | # should not initialize if there are duplicate wallets | ||||
self.assert_start_raises_init_error( | self.assert_start_raises_init_error( | ||||
0, ['-wallet=w1', '-wallet=w1'], 'Error loading wallet w1. Duplicate -wallet filename specified.') | 0, ['-wallet=w1', '-wallet=w1'], 'Error loading wallet w1. Duplicate -wallet filename specified.') | ||||
# should not initialize if wallet file is a directory | # should not initialize if wallet file is a directory | ||||
os.mkdir(wallet_dir('w11')) | os.mkdir(wallet_dir('w11')) | ||||
self.assert_start_raises_init_error( | self.assert_start_raises_init_error( | ||||
0, ['-wallet=w11'], 'Error loading wallet w11. -wallet filename must be a regular file.') | 0, ['-wallet=w11'], 'Error loading wallet w11. -wallet filename must be a regular file.') | ||||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |