Ejemplo n.º 1
0
    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')
Ejemplo n.º 2
0
    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')
Ejemplo n.º 3
0
    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')
Ejemplo n.º 4
0
    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')
Ejemplo n.º 5
0
    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/devreg", True, False, False)
        js(context, "mkt/devreg")
Ejemplo n.º 6
0
    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/devreg", False, False, False)
        js(context, "mkt/devreg")
Ejemplo n.º 7
0
    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')
Ejemplo n.º 8
0
    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')
Ejemplo n.º 9
0
    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/consumer", True, False, False)
        js(context, "mkt/consumer")