def testRestoreWalletFromMinimalGoLive(aliceCLI): fileName = "wallet_from_minimal_go_live" curPath = os.path.dirname(os.path.realpath(__file__)) walletFilePath = os.path.join(curPath, fileName) noEnvKeyringsDir = os.path.join(aliceCLI.getWalletsBaseDir(), NO_ENV) createDirIfNotExists(noEnvKeyringsDir) shutil.copy2(walletFilePath, noEnvKeyringsDir) targetWalletFilePath = os.path.join(noEnvKeyringsDir, fileName) restored = aliceCLI.restoreWalletByPath(targetWalletFilePath) assert restored and isinstance(aliceCLI.activeWallet, Wallet)
def testRestoreWalletFile(aliceCLI): fileName = "tmp_wallet_restore_issue" curPath = os.path.dirname(os.path.realpath(__file__)) walletFilePath = os.path.join(curPath, fileName) noEnvKeyringsDir = os.path.join(aliceCLI.getWalletsBaseDir(), NO_ENV) createDirIfNotExists(noEnvKeyringsDir) shutil.copy2(walletFilePath, noEnvKeyringsDir) targetWalletFilePath = os.path.join(noEnvKeyringsDir, fileName) restored = aliceCLI.restoreWalletByPath(targetWalletFilePath) assert restored and isinstance(aliceCLI.activeWallet, Wallet)
def testRestoreWalletBeforeRenamingLinkToConnection(aliceCLI): fileName = "wallet_before_renaming_link_to_connection" curPath = os.path.dirname(os.path.realpath(__file__)) walletFilePath = os.path.join(curPath, fileName) noEnvKeyringsDir = os.path.join(aliceCLI.getWalletsBaseDir(), NO_ENV) createDirIfNotExists(noEnvKeyringsDir) shutil.copy2(walletFilePath, noEnvKeyringsDir) targetWalletFilePath = os.path.join(noEnvKeyringsDir, fileName) restored = aliceCLI.restoreWalletByPath(targetWalletFilePath) assert restored and isinstance(aliceCLI.activeWallet, Wallet)
def testRestoreWalletFile(aliceCLI): import shutil fileName = "tmp_wallet_restore_issue" curPath = os.path.dirname(os.path.realpath(__file__)) walletFilePath = os.path.join(curPath, fileName) noEnvKeyringsDir = os.path.join(aliceCLI.getKeyringsBaseDir(), NO_ENV) createDirIfNotExists(noEnvKeyringsDir) shutil.copy2(walletFilePath, noEnvKeyringsDir) targetWalletFilePath = os.path.join(noEnvKeyringsDir, fileName) restored = aliceCLI.restoreWalletByPath(targetWalletFilePath) assert restored and isinstance(aliceCLI.activeWallet, Wallet)
def testRestoreWalletFile(aliceCLI): import shutil fileName = "tmp_wallet_restore_issue" curPath = os.path.dirname(os.path.realpath(__file__)) walletFilePath = os.path.join(curPath, fileName) keyringsDir = aliceCLI.getKeyringsBaseDir() createDirIfNotExists(keyringsDir) shutil.copy2(walletFilePath, keyringsDir) targetWalletFilePath = os.path.join(keyringsDir, fileName) wallet = aliceCLI.restoreWalletByPath(targetWalletFilePath) assert wallet is not None and isinstance(wallet, Wallet)