summaryrefslogtreecommitdiff
path: root/isso/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@jelmer.uk>2017-03-24 10:39:35 +0000
committerJelmer Vernooij <jelmer@jelmer.uk>2017-03-24 10:39:35 +0000
commitc82f6da36569e207232b1cb27a72fc9a86c3fa5e (patch)
tree410da49b3f91cb9034432f4c2bc4a1c4109f3d9e /isso/tests
parent511bfe5e5c5381f5f8d38ebd78b5a97c86c733b4 (diff)
Apply patches.
Diffstat (limited to 'isso/tests')
-rw-r--r--isso/tests/test_html.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/isso/tests/test_html.py b/isso/tests/test_html.py
index b1be6dc..9d92615 100644
--- a/isso/tests/test_html.py
+++ b/isso/tests/test_html.py
@@ -63,7 +63,6 @@ class TestHTML(unittest.TestCase):
print("Hello, World")
</code></pre>""")
- @unittest.skipIf(html.HTML5LIB_VERSION <= html.HTML5LIB_SIMPLETREE, "backport")
def test_sanitizer(self):
sanitizer = html.Sanitizer(elements=[], attributes=[])
examples = [
@@ -74,9 +73,8 @@ class TestHTML(unittest.TestCase):
('<script>alert("Onoe")</script>', 'alert("Onoe")')]
for (input, expected) in examples:
- self.assertEqual(html.sanitize(sanitizer, input), expected)
+ self.assertEqual(sanitizer.sanitize(input), expected)
- @unittest.skipIf(html.HTML5LIB_VERSION <= html.HTML5LIB_SIMPLETREE, "backport")
def test_sanitizer_extensions(self):
sanitizer = html.Sanitizer(elements=["img"], attributes=["src"])
examples = [
@@ -84,7 +82,7 @@ class TestHTML(unittest.TestCase):
('<script src="doge.js"></script>', '')]
for (input, expected) in examples:
- self.assertEqual(html.sanitize(sanitizer, input), expected)
+ self.assertEqual(sanitizer.sanitize(input), expected)
def test_render(self):
conf = config.new({