Page MenuHome

test_jinja.py
No OneTemporary

test_jinja.py

import unittest
class MarkdownTest(unittest.TestCase):
def test_happy(self):
from pillar.web import jinja
self.assertEqual('<p>je <strong>moeder</strong></p>',
jinja.do_markdown('je **moeder**').strip())
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())
def test_degenerate(self):
from pillar.web import jinja
self.assertEqual(None, jinja.do_markdown(None))
self.assertEqual('', jinja.do_markdown(''))

File Metadata

Mime Type
text/x-python
Expires
Fri, Dec 2, 9:01 PM (2 d)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
45/2d/3061810a2d486a1df155a80fed86

Event Timeline