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
)
评论列表
文章目录