tests.py 文件源码

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

项目:django-webpack 作者: csinchok 项目源码 文件源码
def test_munge_config(self):

        def mock_find(path):
            return os.path.join('/some/path/static/', path)

        with mock.patch('webpack.conf.find', new=mock_find) as find:

            munged = get_munged_config(WEBPACK_CONFIG)

        expected_output = WEBPACK_CONFIG_OUTPUT.format(
            url=settings.STATIC_URL,
            root=settings.STATIC_ROOT
        )
        self.assertEqual(
            munged,
            expected_output
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号