Fix unittest for jinja.do_markdown

We were passing invalid html to do_markdown, which was returning a valid
version, by closing the <script> tag.
This commit is contained in:
Francesco Siddi 2018-06-22 17:10:38 +02:00
parent 756427b34e
commit 58c33074c3

View File

@ -11,8 +11,8 @@ class MarkdownTest(unittest.TestCase):
def test_bleached(self):
from pillar.web import jinja
self.assertEqual('&lt;script&gt;alert("hey");&lt;script&gt;',
jinja.do_markdown('<script>alert("hey");<script>').strip())
self.assertEqual('&lt;script&gt;alert("hey");&lt;/script&gt;',
jinja.do_markdown('<script>alert("hey");</script>').strip())
def test_degenerate(self):
from pillar.web import jinja