Пример #1
0
    def test_prod_minified(self, fake_css):
        request = mock.Mock()
        request.GET = {}
        context = {'request': request}

        # Should be called with `debug=False`.
        fake_css.expects('css').with_args('mkt/consumer', False, False)
        css(context, 'mkt/consumer')
Пример #2
0
    def test_prod_unminified_overridden(self, fake_css):
        request = mock.Mock()
        request.GET = {'debug': 'true'}
        context = {'request': request}

        # Should be called with `debug=True`.
        fake_css.expects('css').with_args('mkt/consumer', False, True)
        css(context, 'mkt/consumer')
Пример #3
0
    def test_prod_minified(self, fake_css):
        request = mock.Mock()
        request.GET = {}
        context = {'request': request}

        # Should be called with `debug=False`.
        fake_css.expects('css').with_args('mkt/consumer', False, False)
        css(context, 'mkt/consumer')
Пример #4
0
    def test_prod_unminified_overridden(self, fake_css):
        request = mock.Mock()
        request.GET = {'debug': 'true'}
        context = {'request': request}

        # Should be called with `debug=True`.
        fake_css.expects('css').with_args('mkt/consumer', False, True)
        css(context, 'mkt/consumer')
Пример #5
0
    def test_prod_unminified_overridden(self, fake_css):
        request = mock.Mock()
        request.GET = {"debug": "true"}
        context = {"request": request}

        # Should be called with `debug=True`.
        fake_css.expects("css").with_args("mkt/devreg", False, True)
        css(context, "mkt/devreg")
Пример #6
0
    def test_prod_minified(self, fake_css):
        request = mock.Mock()
        request.GET = {}
        context = {"request": request}

        # Should be called with `debug=False`.
        fake_css.expects("css").with_args("mkt/devreg", False, False)
        css(context, "mkt/devreg")
Пример #7
0
    def test_dev_unminified(self, fake_css):
        request = mock.Mock()
        request.GET = {}
        context = {'request': request}

        # Should be called with `debug=True`.
        fake_css.expects('css').with_args('mkt/devreg', False, True)
        css(context, 'mkt/devreg')
Пример #8
0
    def test_dev_unminified(self, fake_css):
        request = mock.Mock()
        request.GET = {}
        context = {'request': request}

        # Should be called with `debug=True`.
        fake_css.expects('css').with_args('mkt/devreg', False, True)
        css(context, 'mkt/devreg')
Пример #9
0
    def test_dev_unminified(self, fake_css):
        request = mock.Mock()
        request.GET = {}
        context = {"request": request}

        # Should be called with `debug=True`.
        fake_css.expects("css").with_args("mkt/consumer", False, True)
        css(context, "mkt/consumer")