Another Step in the Quest to clean up the code base.

This commit is contained in:
2017-09-08 07:19:50 +02:00
parent ce218080b2
commit b3ab9798b5
229 changed files with 1915 additions and 15175 deletions

View File

@@ -1,8 +1,18 @@
""" This should be the place to test the functinality of the random
stuff that has been collected in the utils package. Idealy we shuld get rid
of this random addons. """
import unittest
import html_cleaner
from utils import html_cleaner
class HtmlTestCase(unittest.TestCase):
""" Unit testcase to verify the HTML cleanup class.
It should removed unwanted syling tags an more get rid of dangerous
JavaScript elements.
"""
known_html = (
('<STRONG>Fett!</STRONG>', '<strong>Fett!</strong>'),
('<a href="link.html" onclick="do_evil()">Bad Link</a>',
@@ -34,7 +44,7 @@ class HtmlTestCase(unittest.TestCase):
xxx-xxxx</FONT></DIV></BODY></HTML>
''',
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">'
)
)
)
def test_html_cleaner(self):