def test_load_wallet_by_empty_path_fail(tdir_for_func, keyrings_base_dir): wsh = WalletStorageHelper(keyrings_base_dir) for path in (None, ''): with pytest.raises(ValueError) as exc_info: wsh.loadWallet(path) exc_info.match(r'empty path')
def test_load_wallet_by_empty_path_fail(tdir_for_func, keyrings_base_dir): wsh = WalletStorageHelper(keyrings_base_dir) for path in (None, ''): with pytest.raises(ValueError) as exc_info: wsh.loadWallet(path) exc_info.match(r'empty path')
def test_load_wallet_by_abs_path( tdir_for_func, keyrings_base_dir, test_wallet): wsh = WalletStorageHelper(keyrings_base_dir) abs_path = os.path.join(keyrings_base_dir, "5/6/7/wallet") wsh.saveWallet(test_wallet, abs_path) loaded_wallet = wsh.loadWallet(abs_path) # TODO no comparison operator for Wallet (and classes it used) assert encode_wallet(test_wallet) == encode_wallet(loaded_wallet)
def test_load_wallet_by_abs_path(tdir_for_func, keyrings_base_dir, test_wallet): wsh = WalletStorageHelper(keyrings_base_dir) abs_path = os.path.join(keyrings_base_dir, "5/6/7/wallet") wsh.saveWallet(test_wallet, abs_path) loaded_wallet = wsh.loadWallet(abs_path) # TODO no comparison operator for Wallet (and classes it used) assert encode_wallet(test_wallet) == encode_wallet(loaded_wallet)
def test_loaded_wallet_data(tdir_for_func, keyrings_base_dir, test_wallet): wpath = 'ctx/test.wallet' wsh = WalletStorageHelper(keyrings_base_dir) wsh.saveWallet(test_wallet, wpath) loaded_wallet = wsh.loadWallet(wpath) # TODO no comparison operator for Wallet (and classes it used) assert encode_wallet(test_wallet) == encode_wallet(loaded_wallet)
def test_loaded_wallet_data(tdir_for_func, keyrings_base_dir, test_wallet): wpath = 'ctx/test.wallet' wsh = WalletStorageHelper(keyrings_base_dir) wsh.saveWallet(test_wallet, wpath) loaded_wallet = wsh.loadWallet(wpath) # TODO no comparison operator for Wallet (and classes it used) assert encode_wallet(test_wallet) == encode_wallet(loaded_wallet)