Ejemplo n.º 1
0
 def test_unescaped_sigil(self):
     view = Escaped(template="<h1>{{& thing}}</h1>", context={
             'thing': 'Bear > Giraffe'
             })
     self.assertEquals(view.render(), "<h1>Bear > Giraffe</h1>")
Ejemplo n.º 2
0
 def test_escaped(self):
     self.assertEquals(Escaped().render(), "<h1>Bear &gt; Shark</h1>")
Ejemplo n.º 3
0
 def test_unescaped_sigil(self):
     view = Escaped(template="<h1>{{& thing}}</h1>", context={
             'thing': 'Bear > Giraffe'
             })
     self.assertEquals(view.render(), "<h1>Bear > Giraffe</h1>")
Ejemplo n.º 4
0
 def test_escaping(self):
     self._assert(Escaped(), u"<h1>Bear &gt; Shark</h1>")