def setUp(self):
self.root = os.path.dirname(__import__(settings.ROOT_URLCONF).__file__)<EOL>sys.path.append(self.root)<EOL>self.unique_id = str(uuid4()).replace("<STR_LIT:->", "<STR_LIT>")<EOL>self.test_apps = ["<STR_LIT>" % (i, self.unique_id) for i in range(<NUM_LIT:10>)]<EOL>for test_app in self.test_apps:<EOL><INDENT>app_dir = os.path.join(self.root, test_app)<EOL>os.mkdir(app_dir)<EOL>app_templates = os.path.join(app_dir, "<STR_LIT>")<EOL>os.mkdir(app_templates)<EOL>with open(os.path.join(app_dir, "<STR_LIT>"), "<STR_LIT:w>") as f:<EOL><INDENT>f.write("<STR_LIT>")<EOL><DEDENT>extends = test_app != self.test_apps[-<NUM_LIT:1>]<EOL>self._create_template(app_templates, test_app, extends)<EOL><DEDENT>project_templates = os.path.join(self.root, "<STR_LIT>")<EOL>self.project_templates_exist = os.path.exists(project_templates)<EOL>if not self.project_templates_exist:<EOL><INDENT>os.mkdir(project_templates)<EOL><DEDENT>self._create_template(project_templates, "<STR_LIT>", True)<EOL>
Put the test template into a couple of test apps and the project.