Exemple #1
0
    def test__escape__uses_renderer_unicode(self):
        """
        Test that escape uses the renderer's unicode function.

        """
        renderer = Renderer()
        renderer.str = mock_unicode

        engine = renderer._make_render_engine()
        escape = engine.escape

        b = "foo".encode('ascii')
        self.assertEqual(escape(b), "FOO")
Exemple #2
0
    def test__escape__uses_renderer_unicode(self):
        """
        Test that escape uses the renderer's unicode function.

        """
        renderer = Renderer()
        renderer.str = mock_unicode

        engine = renderer._make_render_engine()
        escape = engine.escape

        b = "foo".encode('ascii')
        self.assertEqual(escape(b), "FOO")