本文整理汇总了Python中mkt.site.helpers.js函数的典型用法代码示例。如果您正苦于以下问题:Python js函数的具体用法?Python js怎么用?Python js使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了js函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_prod_unminified_overridden
def test_prod_unminified_overridden(self, fake_js):
request = mock.Mock()
request.GET = {'debug': 'true'}
context = {'request': request}
# Should be called with `debug=True`.
fake_js.expects('js').with_args('mkt/consumer', True, False, False)
js(context, 'mkt/consumer')
示例2: test_prod_minified
def test_prod_minified(self, fake_js):
request = mock.Mock()
request.GET = {}
context = {'request': request}
# Should be called with `debug=False`.
fake_js.expects('js').with_args('mkt/consumer', False, False, False)
js(context, 'mkt/consumer')
示例3: test_dev_unminified
def test_dev_unminified(self, fake_js):
request = mock.Mock()
request.GET = {}
context = {'request': request}
# Should be called with `debug=True`.
fake_js.expects('js').with_args('mkt/devreg', True, False, False)
js(context, 'mkt/devreg')