Beispiel #1
0
 def test_decrypt(self, *args):
     self.command.path = None
     self.command.decrypt = True
     encrypted_file, self.command.filename = utils.encrypt_file(
         get_dump(), get_dump_name())
     HANDLED_FILES['written_files'].append(
         (self.command.filename, encrypted_file))
     self.command._restore_backup()
Beispiel #2
0
 def test_uncompress(self, *args):
     self.command.path = None
     compressed_file, self.command.filename = utils.compress_file(
         get_dump(), get_dump_name())
     HANDLED_FILES['written_files'].append(
         (self.command.filename, compressed_file))
     self.command.uncompress = True
     self.command._restore_backup()
 def test_decrypt(self, *args):
     self.command.path = None
     self.command.decrypt = True
     encrypted_file, self.command.filename = utils.encrypt_file(get_dump(), get_dump_name())
     HANDLED_FILES['written_files'].append(
         (self.command.filename, encrypted_file)
     )
     self.command._restore_backup()
 def test_uncompress(self, *args):
     self.command.path = None
     compressed_file, self.command.filename = utils.compress_file(get_dump(), get_dump_name())
     HANDLED_FILES['written_files'].append(
         (self.command.filename, compressed_file)
     )
     self.command.uncompress = True
     self.command._restore_backup()
Beispiel #5
0
 def test_path(self, *args):
     temp_dump = get_dump()
     dump_path = mktemp()
     with open(dump_path, 'wb') as dump:
         copyfileobj(temp_dump, dump)
     self.command.path = dump.name
     self.command._restore_backup()
     self.command.decrypt = False
     self.command.filepath = get_dump_name()
     HANDLED_FILES['written_files'].append(
         (self.command.filepath, get_dump()))
     self.command._restore_backup()
 def test_path(self, *args):
     temp_dump = get_dump()
     dump_path = mktemp()
     with open(dump_path, 'wb') as dump:
         copyfileobj(temp_dump, dump)
     self.command.path = dump.name
     self.command._restore_backup()
     self.command.decrypt = False
     self.command.filepath = get_dump_name()
     HANDLED_FILES['written_files'].append(
         (self.command.filepath, get_dump())
     )
     self.command._restore_backup()