test_base.py 文件源码

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

项目:deb-python-django-compressor 作者: openstack 项目源码 文件源码
def setUp(self):
        self.css = '<link rel="stylesheet" href="/static/css/one.css" type="text/css" />'
        self.tmpdir = mkdtemp()
        new_static_root = os.path.join(self.tmpdir, "static")
        copytree(settings.STATIC_ROOT, new_static_root)

        self.override_settings = self.settings(
            COMPRESS_ENABLED=True,
            COMPRESS_PRECOMPILERS=(),
            COMPRESS_DEBUG_TOGGLE='nocompress',
            DEBUG=True,
            STATIC_ROOT=new_static_root,
            COMPRESS_ROOT=new_static_root,
            STATICFILES_DIRS=[settings.COMPRESS_ROOT]
        )
        self.override_settings.__enter__()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号