當前位置: 首頁>>代碼示例>>Python>>正文


Python utils.HANDLED_FILES類代碼示例

本文整理匯總了Python中dbbackup.tests.utils.HANDLED_FILES的典型用法代碼示例。如果您正苦於以下問題:Python HANDLED_FILES類的具體用法?Python HANDLED_FILES怎麽用?Python HANDLED_FILES使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了HANDLED_FILES類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: setUp

 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()
開發者ID:goodtune,項目名稱:django-dbbackup,代碼行數:7,代碼來源:test_commands.py

示例2: setUp

 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)
     ]
開發者ID:ZuluPro,項目名稱:django-dbbackup,代碼行數:25,代碼來源:test_storage.py

示例3: setUp

 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()()
開發者ID:pombredanne,項目名稱:django-dbbackup,代碼行數:10,代碼來源:test_mediabackup.py

示例4: setUp

 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',
     ]]
開發者ID:anupkrish24,項目名稱:kaLLogs,代碼行數:13,代碼來源:test_mediabackup.py

示例5: setUp

 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()
開發者ID:Fisiu,項目名稱:django-dbbackup,代碼行數:13,代碼來源:test_dbrestore.py

示例6: setUp

 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)
開發者ID:gardenia,項目名稱:django-dbbackup,代碼行數:14,代碼來源:test_dbrestore.py

示例7: setUp

 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()
開發者ID:RoPP,項目名稱:django-dbbackup,代碼行數:14,代碼來源:test_dbrestore.py

示例8: setUp

 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)
     ]
開發者ID:Fisiu,項目名稱:django-dbbackup,代碼行數:14,代碼來源:test_base.py

示例9: setUp

 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',
     ]]
開發者ID:pombredanne,項目名稱:django-dbbackup,代碼行數:16,代碼來源:test_base.py

示例10: setUp

 def setUp(self):
     HANDLED_FILES.clean()
     self.command = DbbackupCommand()
     self.command.servername = "foo-server"
     self.command.storage = FakeStorage()
     self.command.stdout = DEV_NULL
開發者ID:gardenia,項目名稱:django-dbbackup,代碼行數:6,代碼來源:test_mediabackup.py

示例11: tearDown

 def tearDown(self):
     HANDLED_FILES.clean()
開發者ID:anupkrish24,項目名稱:kaLLogs,代碼行數:2,代碼來源:test_base.py

示例12: setUp

 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()
開發者ID:gardenia,項目名稱:django-dbbackup,代碼行數:5,代碼來源:test_commands.py

示例13: setUp

 def setUp(self):
     HANDLED_FILES.clean()
     add_public_gpg()
     add_private_gpg()
     open(TEST_DATABASE['NAME'], 'a').close()
開發者ID:CalPolyResDev,項目名稱:django-dbbackup,代碼行數:5,代碼來源:test_commands.py

示例14: setUp

 def setUp(self):
     HANDLED_FILES.clean()
     self.command = BaseDbBackupCommand()
     self.command.storage = get_storage()
開發者ID:Ubiwhere,項目名稱:django-dbbackup,代碼行數:4,代碼來源:test_base.py

示例15: setUp

 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')
開發者ID:pombredanne,項目名稱:django-dbbackup,代碼行數:6,代碼來源:test_commands.py


注:本文中的dbbackup.tests.utils.HANDLED_FILES類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。