def setUp(self):
        self.working_dir = tempfile.mkdtemp() 
        self.job_dir = os.path.join(self.working_dir, 'master', 'jobs')
        self.zip_dir = os.path.join(self.working_dir, 'master', 'zip')
        
        if not os.path.exists(self.zip_dir):
            os.makedirs(self.zip_dir)
        
        wiki_path = os.path.join(
            os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 
            'app', 'wiki')
        try:
            shutil.copytree(wiki_path, os.path.join(self.job_dir, 'wiki'))
        except __HOLE__, e:
            if e.errno == errno.ENOTDIR:
                shutil.copy(wiki_path, os.path.join(self.job_dir, 'wiki'))
            else:
                raise
        
        self.job_name = import_job_desc(wiki_path).uniq_name
        old_wiki_path = os.path.join(self.job_dir, 'wiki')
        new_wiki_path = os.path.join(self.job_dir, self.job_name)
        os.rename(old_wiki_path, new_wiki_path)
        
        ZipHandler.compress(os.path.join(self.zip_dir, self.job_name+'.zip'), 
                            new_wiki_path)
        
        config_file = os.path.join(new_wiki_path, 'wiki.yaml')
        try:
            os.remove(os.path.join(new_wiki_path, 'test.yaml'))
        except:
            pass
        
        with open(config_file) as f:
            yaml_obj = yaml.load(f)
            yaml_obj['job']['size'] = 5
            yaml_obj['job']['instances'] = 1
            yaml_obj['job']['priorities'] = 1
        with open(config_file, 'w') as f:
            yaml.dump(yaml_obj, f)
dataset/ETHPy150Open chineking/cola/tests/test_master_worker.py/Test.setUp