def setUpClass(cls):
"""
The setUpClass is used because the templates paths are not changed in
the following tests.
"""
super(TestBase, cls).setUpClass()
# Find directories with templates
templates_dir = settings.TEMPLATES[0]['DIRS'][0]
app = apps.get_app_config('app')
app_templates = os.path.join(app.path, 'templates', 'app', 'templates')
app_tags = os.path.join(app.path, 'templates', 'app', 'tags')
# Save the path of each template for further testing
cls.master_template = os.path.join(templates_dir, 'master.html')
cls.tag_template = os.path.join(app_tags, 'tag_template.html')
cls.double_loads = os.path.join(app_templates, 'double_loads.html')
cls.with_tags = os.path.join(app_templates, 'with_tags.html')
cls.without_tags = os.path.join(app_templates, 'without_tags.html')
cls.from_syntax_with_tags = os.path.join(app_templates,
'from_syntax_with_tags.html')
cls.from_syntax_without_tags = os.path.join(app_templates,
'from_syntax_without_tags.html')
cls.double_member_load = os.path.join(app_templates,
'double_member_load.html')
cls.only_filter = os.path.join(app_templates, 'only_filter.html')
评论列表
文章目录