def setUp(self): self.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 = DbbackupCommand() self.command.servername = 'foo-server' self.command.encrypt = False self.command.compress = False self.command.dbcommands = MongoDBCommands(TEST_MONGODB) self.command.storage = FakeStorage() self.command.stdout = DEV_NULL
def setUp(self): self.command = DbbackupCommand() self.command.database = TEST_DATABASE['NAME'] self.command.dbcommands = DBCommands(TEST_DATABASE) self.command.storage = FakeStorage() self.command.stdout = DEV_NULL self.command.filename = None self.command.path = None
def setUp(self): self.command = DbbackupCommand() self.command.database = TEST_DATABASE['NAME'] self.command.storage = FakeStorage() self.command.stdout = DEV_NULL self.command.filename = None self.command.path = None self.command.connector = get_connector('default')
def setUp(self): self.command = DbbackupCommand() self.command.database = TEST_DATABASE['NAME'] self.command.dbcommands = DBCommands(TEST_DATABASE) self.command.storage = FakeStorage() self.command.clean = True self.command.clean_keep = 1 self.command.stdout = DEV_NULL
def setUp(self): self.command = ListbackupsCommand() 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): if six.PY3: self.skipTest("Compression isn't implemented in Python3") open(TEST_DATABASE['NAME'], 'a+b').close() self.command = DbbackupCommand() self.command.database = TEST_DATABASE['NAME'] self.command.dbcommands = DBCommands(TEST_DATABASE) self.command.storage = FakeStorage() self.command.stdout = DEV_NULL
def setUp(self): self.command = DbbackupCommand() self.command.servername = 'foo-server' self.command.encrypt = False self.command.compress = False self.command.storage = FakeStorage() self.command.stdout = DEV_NULL self.command.filename = None self.command.path = None self.command.connector = get_connector('default')
def setUp(self): self.command = DbbackupCommand() self.command.servername = 'foo-server' self.command.encrypt = False self.command.compress = False self.command.database = TEST_DATABASE['NAME'] self.command.storage = FakeStorage() self.command.connector = get_connector() self.command.stdout = DEV_NULL self.command.filename = None self.command.path = None
def setUp(self): open(TEST_DATABASE['NAME'], 'a+b').close() self.command = DbbackupCommand() self.command.servername = 'foo-server' self.command.encrypt = False self.command.compress = False self.command.database = TEST_DATABASE['NAME'] self.command.dbcommands = DBCommands(TEST_DATABASE) self.command.storage = FakeStorage() self.command.stdout = DEV_NULL open(TEST_DATABASE['NAME']).close()
def setUp(self): 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_DATABASE self.command.dbcommands = DBCommands(TEST_DATABASE) self.command.passphrase = None self.command.storage = FakeStorage()
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.storage = FakeStorage() cmd = ('gpg --import %s' % GPG_PRIVATE_PATH).split() subprocess.call(cmd, stdout=DEV_NULL, stderr=DEV_NULL)
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): 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.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): self.storage = FakeStorage() HANDLED_FILES['written_files'] = [(f, None) for f in [ 'foo.txt', 'foo.db', 'foo.db.gz', 'foo.db.gpg', 'foo.db.gz.gpg', 'foo.media', 'foo.media.gz', 'foo.media.gpg', 'foo.media.gz.gpg', 'bar.db', 'bar.db.gz', 'bar.db.gpg', 'bar.db.gz.gpg', 'bar.media', 'bar.media.gz', 'bar.media.gpg', 'bar.media.gz.gpg', ]]
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): self.skipTest("Doesn't work!") self.command = DbbackupCommand() self.command.servername = 'foo-server' self.command.storage = FakeStorage()
def setUp(self): self.command = DbbackupCommand() self.command.servername = 'foo-server' self.command.storage = FakeStorage()