当前位置: 首页>>代码示例>>Python>>正文


Python HANDLED_FILES.clean方法代码示例

本文整理汇总了Python中dbbackup.tests.utils.HANDLED_FILES.clean方法的典型用法代码示例。如果您正苦于以下问题:Python HANDLED_FILES.clean方法的具体用法?Python HANDLED_FILES.clean怎么用?Python HANDLED_FILES.clean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dbbackup.tests.utils.HANDLED_FILES的用法示例。


在下文中一共展示了HANDLED_FILES.clean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 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,代码行数:9,代码来源:test_commands.py

示例2: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 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,代码行数:27,代码来源:test_storage.py

示例3: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 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,代码行数:12,代码来源:test_mediabackup.py

示例4: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 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,代码行数:15,代码来源:test_mediabackup.py

示例5: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 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,代码行数:15,代码来源:test_dbrestore.py

示例6: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 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,代码行数:16,代码来源:test_dbrestore.py

示例7: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 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,代码行数:16,代码来源:test_dbrestore.py

示例8: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 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,代码行数:16,代码来源:test_base.py

示例9: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 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,代码行数:18,代码来源:test_base.py

示例10: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 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,代码行数:8,代码来源:test_mediabackup.py

示例11: tearDown

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 def tearDown(self):
     HANDLED_FILES.clean()
开发者ID:anupkrish24,项目名称:kaLLogs,代码行数:4,代码来源:test_base.py

示例12: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 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,代码行数:7,代码来源:test_commands.py

示例13: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 def setUp(self):
     HANDLED_FILES.clean()
     add_public_gpg()
     add_private_gpg()
     open(TEST_DATABASE['NAME'], 'a').close()
开发者ID:CalPolyResDev,项目名称:django-dbbackup,代码行数:7,代码来源:test_commands.py

示例14: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 def setUp(self):
     HANDLED_FILES.clean()
     self.command = BaseDbBackupCommand()
     self.command.storage = get_storage()
开发者ID:Ubiwhere,项目名称:django-dbbackup,代码行数:6,代码来源:test_base.py

示例15: setUp

# 需要导入模块: from dbbackup.tests.utils import HANDLED_FILES [as 别名]
# 或者: from dbbackup.tests.utils.HANDLED_FILES import clean [as 别名]
 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,代码行数:8,代码来源:test_commands.py


注:本文中的dbbackup.tests.utils.HANDLED_FILES.clean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。