test_base.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:django-unload 作者: Styria-Digital 项目源码 文件源码
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')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号