def setUp(self): super(PosixBackupDriverTestCase, self).setUp() self.ctxt = context.get_admin_context() self.override_config('backup_file_size', FAKE_FILE_SIZE) self.override_config('backup_sha_block_size_bytes', FAKE_SHA_BLOCK_SIZE_BYTES) self.override_config('backup_enable_progress_timer', FAKE_BACKUP_ENABLE_PROGRESS_TIMER) self.override_config('backup_posix_path', FAKE_BACKUP_POSIX_PATH) self.mock_object(posix, 'LOG') self.driver = posix.PosixBackupDriver(self.ctxt)
def test_init(self): drv = posix.PosixBackupDriver(self.ctxt) self.assertEqual(FAKE_BACKUP_POSIX_PATH, drv.backup_path)