summaryrefslogtreecommitdiff
path: root/isso/tests/test_html.py
diff options
context:
space:
mode:
Diffstat (limited to 'isso/tests/test_html.py')
-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({