def test_decryptFileWithSameLocation(self): validFilePath = r"C:\Users\Gulyani\Dropbox\work\new work\EXE locker\EXE_locker\test_file\BTSync.exelocker" eFile = EncryptedFile(validFilePath) password = EncryptionHelper.generateKeyHash("password") sameLocation = True eFile.decryptFile(password, sameLocation) decryptedFileName = eFile.getOriginalFileName() unencryptedFileLocation = os.path.join(os.path.dirname(validFilePath), decryptedFileName) self.assertTrue(os.path.exists(unencryptedFileLocation))
def test_decryptFile(self): validFilePath = r"C:\Users\Gulyani\Dropbox\work\new work\EXE locker\EXE_locker\test_file\BTSync.exelocker" eFile = EncryptedFile(validFilePath) password = EncryptionHelper.generateKeyHash("password") eFile.decryptFile(password) self.assertTrue(os.path.exists(eFile.getOriginalFileName()))