def setUp(self): if six.PY3: self.skipTest("Compression isn't implemented in Python3") HANDLED_FILES.clean() cmd = ('gpg --import %s' % GPG_PUBLIC_PATH).split() subprocess.call(cmd, stdout=DEV_NULL, stderr=DEV_NULL) open(TEST_DATABASE['NAME'], 'a').close()
def setUp(self): HANDLED_FILES.clean() self.storage = get_storage() # foodb files HANDLED_FILES['written_files'] += [ (utils.filename_generate(ext, 'foodb'), None) for ext in ('db', 'db.gz', 'db.gpg', 'db.gz.gpg') ] HANDLED_FILES['written_files'] += [ (utils.filename_generate(ext, 'hamdb', 'fooserver'), None) for ext in ('db', 'db.gz', 'db.gpg', 'db.gz.gpg') ] # Media file HANDLED_FILES['written_files'] += [ (utils.filename_generate(ext, None, None, 'media'), None) for ext in ('tar', 'tar.gz', 'tar.gpg', 'tar.gz.gpg') ] HANDLED_FILES['written_files'] += [ (utils.filename_generate(ext, 'bardb', 'barserver'), None) for ext in ('db', 'db.gz', 'db.gpg', 'db.gz.gpg') ] # barserver files HANDLED_FILES['written_files'] += [ ('file_without_date', None) ]
def setUp(self): self.storage = FakeStorage() HANDLED_FILES.clean() HANDLED_FILES['written_files'] = [(f, None) for f in [ '2015-02-06-042810.bak', '2015-02-07-042810.bak', '2015-02-08-042810.bak', ]]
def setUp(self): self.storage = get_storage() HANDLED_FILES.clean() HANDLED_FILES['written_files'] = [(f, None) for f in [ '2015-02-06-042810.bak', '2015-02-07-042810.bak', '2015-02-08-042810.bak', ]]
def setUp(self): HANDLED_FILES.clean() self.command = DbbackupCommand() self.command.servername = 'foo-server' self.command.storage = get_storage() self.command.stdout = DEV_NULL self.command.compress = False self.command.encrypt = False self.command.path = None self.command.media_storage = get_storage_class()()
def setUp(self): HANDLED_FILES.clean() self.storage = get_storage() HANDLED_FILES['written_files'] += [ (utils.filename_generate(ext, 'foo'), None) for ext in ('db', 'db.gz', 'db.gpg', 'db.gz.gpg') ] HANDLED_FILES['written_files'] += [ (utils.filename_generate(ext, 'foo', None, 'media'), None) for ext in ('tar', 'tar.gz', 'tar.gpg', 'tar.gz.gpg') ] HANDLED_FILES['written_files'] += [('file_without_date', None)]
def setUp(self): self.command = DbrestoreCommand() self.command.stdout = DEV_NULL self.command.uncompress = False self.command.decrypt = False self.command.backup_extension = 'bak' self.command.filename = 'foofile' self.command.database = TEST_DATABASE self.command.passphrase = None self.command.interactive = True self.command.storage = FakeStorage() self.command.connector = get_connector() HANDLED_FILES.clean()
def setUp(self): HANDLED_FILES.clean() self.command = DbbackupCommand() self.command.stdout = DEV_NULL self.command.encrypt = False self.command.compress = False self.command.servername = 'foo-server' self.command.storage = FakeStorage() HANDLED_FILES['written_files'] = [(f, None) for f in [ '2015-02-06-042810.bak', '2015-02-07-042810.bak', '2015-02-08-042810.bak', ]]
def setUp(self): self.command = DbrestoreCommand() self.command.stdout = DEV_NULL self.command.uncompress = False self.command.decrypt = False self.command.backup_extension = 'bak' self.command.filepath = 'foofile' self.command.database = TEST_DATABASE self.command.dbcommands = DBCommands(TEST_DATABASE) self.command.passphrase = None self.command.interactive = True self.command.storage = FakeStorage() HANDLED_FILES.clean() add_private_gpg()
def setUp(self): self.command = DbrestoreCommand() self.command.stdout = DEV_NULL self.command.uncompress = False self.command.decrypt = False self.command.backup_extension = 'bak' self.command.filepath = 'foofile' self.command.database = TEST_DATABASE self.command.dbcommands = DBCommands(TEST_DATABASE) self.command.passphrase = None self.command.storage = FakeStorage() HANDLED_FILES.clean() cmd = ('gpg --import %s' % GPG_PRIVATE_PATH).split() subprocess.call(cmd, stdout=DEV_NULL, stderr=DEV_NULL)
def setUp(self): HANDLED_FILES.clean() self.storage = FakeStorage() HANDLED_FILES['written_files'] += [ (utils.filename_generate(ext, 'foo'), None) for ext in ('db', 'db.gz', 'db.gpg', 'db.gz.gpg') ] HANDLED_FILES['written_files'] += [ (utils.filename_generate(ext, 'foo', None, 'media'), None) for ext in ('media', 'media.gz', 'media.gpg', 'media.gz.gpg') ] HANDLED_FILES['written_files'] += [ ('file_without_date', None) ]
def setUp(self): self.command = DbrestoreCommand() self.command.stdout = DEV_NULL self.command.uncompress = False self.command.decrypt = False self.command.backup_extension = "bak" self.command.filepath = "foofile" self.command.database = TEST_MONGODB self.command.dbcommands = MongoDBCommands(TEST_MONGODB) self.command.passphrase = None self.command.interactive = True self.command.storage = FakeStorage() HANDLED_FILES.clean() add_private_gpg()
def setUp(self): self.command = DbrestoreCommand() self.command.stdout = DEV_NULL self.command.uncompress = False self.command.decrypt = False self.command.backup_extension = 'bak' self.command.path = None self.command.filename = 'foofile' self.command.database = TEST_MONGODB self.command.passphrase = None self.command.interactive = True self.command.storage = FakeStorage() self.command.connector = MongoDumpConnector() HANDLED_FILES.clean() add_private_gpg()
def setUp(self): HANDLED_FILES.clean() self.command = BaseDbBackupCommand() self.command.stdout = DEV_NULL self.command.encrypt = False self.command.compress = False self.command.servername = 'foo-server' self.command.storage = get_storage() HANDLED_FILES['written_files'] = [(f, None) for f in [ '2015-02-06-042810.tar', '2015-02-07-042810.tar', '2015-02-08-042810.tar', 'foodb-2015-02-06-042810.dump', 'foodb-2015-02-07-042810.dump', 'foodb-2015-02-08-042810.dump', ]]
def setUp(self): HANDLED_FILES.clean() self.command = DbbackupCommand() self.command.servername = 'foo-server' self.command.storage = FakeStorage() self.command.stdout = DEV_NULL
def setUp(self): HANDLED_FILES.clean() add_public_gpg() add_private_gpg() open(TEST_DATABASE['NAME'], 'a').close()
def setUp(self): HANDLED_FILES.clean() add_public_gpg()
def tearDown(self): HANDLED_FILES.clean()
def setUp(self): HANDLED_FILES.clean() cmd = ('gpg --import %s' % GPG_PUBLIC_PATH).split() subprocess.call(cmd, stdout=DEV_NULL, stderr=DEV_NULL) open(TEST_DATABASE['NAME'], 'a').close()
def setUp(self): HANDLED_FILES.clean() add_public_gpg() add_private_gpg() open(TEST_DATABASE['NAME'], 'a').close() self.instance = models.CharModel.objects.create(field='foo')
def setUp(self): HANDLED_FILES.clean() self.command = DbbackupCommand() self.command.servername = "foo-server" self.command.storage = FakeStorage() self.command.stdout = DEV_NULL
def setUp(self): HANDLED_FILES.clean() self.command = BaseDbBackupCommand() self.command.storage = get_storage()