MCPcopy
hub / github.com/isso-comments/isso / test_render

Method test_render

isso/tests/test_html_misaka.py:67–81  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 self.assertEqual(_expected, convert.render(_in))
66
67 def test_render(self):
68 conf = config.new(
69 {
70 "markup": {"renderer": "misaka", "allowed-elements": "", "allowed-attributes": ""},
71 "markup.misaka": {"options": "autolink", "flags": ""},
72 }
73 )
74 convert = Markup(conf)
75 self.assertIn(
76 convert.render("http://example.org/ and sms:+1234567890"),
77 [
78 '<p><a href="http://example.org/" rel="nofollow noopener">http://example.org/</a> and sms:+1234567890</p>',
79 '<p><a rel="nofollow noopener" href="http://example.org/">http://example.org/</a> and sms:+1234567890</p>',
80 ],
81 )
82
83 def test_sanitized_render_extensions(self):
84 """Options should be normalized from both dashed-case or snake_case (legacy)"""

Callers

nothing calls this directly

Calls 3

renderMethod · 0.95
MarkupClass · 0.90
newMethod · 0.45

Tested by

no test coverage detected