'Set up for testing swift.object.server.ObjectController'

def setUp(self):

    utils.HASH_PATH_SUFFIX = 'endcap'
    utils.HASH_PATH_PREFIX = 'startcap'
    self.tmpdir = mkdtemp()
    self.testdir = os.path.join(self.tmpdir, 'tmp_test_object_server_ObjectController')
    mkdirs(os.path.join(self.testdir, 'sda1'))
    self.conf = {'devices': self.testdir, 'mount_check': 'false', 'container_update_timeout': 0.0}
    self.object_controller = object_server.ObjectController(self.conf, logger=debug_logger())
    self.object_controller.bytes_per_sync = 1
    self._orig_tpool_exc = tpool.execute
    tpool.execute = (lambda f, *args, **kwargs: f(*args, **kwargs))
    self.df_mgr = diskfile.DiskFileManager(self.conf, self.object_controller.logger)
    self.logger = debug_logger('test-object-controller')
    self.ts = make_timestamp_iter()
    self.ec_policies = [p for p in POLICIES if (p.policy_type == EC_POLICY)]
