コード例 #1
0
class MediabackupGetBackupBasenameTest(TestCase):
    def setUp(self):
        self.command = DbbackupCommand()
        self.command.servername = 'foo-server'
        self.command.storage = FakeStorage()

    def test_func(self):
        output = self.command.get_backup_basename()
        self.assertTrue(output.endswith('.tar'))

    def test_compress(self):
        options = {'compress': True}
        output = self.command.get_backup_basename(**options)
        self.assertTrue(output.endswith('.tar.gz'))

    def test_encrypt(self):
        options = {'compress': True}
        output = self.command.get_backup_basename(**options)
        self.assertTrue(output.endswith('.tar.gz'))

    def test_compress_and_encrypt(self):
        options = {'compress': True}
        output = self.command.get_backup_basename(**options)
        self.assertTrue(output.endswith('.tar.gz'))
コード例 #2
0
class MediabackupGetBackupBasenameTest(TestCase):
    def setUp(self):
        self.command = DbbackupCommand()
        self.command.servername = "foo-server"
        self.command.storage = FakeStorage()

    def test_func(self):
        output = self.command.get_backup_basename()
        self.assertTrue(output.endswith(".tar"))

    def test_compress(self):
        options = {"compress": True}
        output = self.command.get_backup_basename(**options)
        self.assertTrue(output.endswith(".tar.gz"))

    def test_encrypt(self):
        options = {"compress": True}
        output = self.command.get_backup_basename(**options)
        self.assertTrue(output.endswith(".tar.gz"))

    def test_compress_and_encrypt(self):
        options = {"compress": True}
        output = self.command.get_backup_basename(**options)
        self.assertTrue(output.endswith(".tar.gz"))