]> git.scottworley.com Git - paperdoorknob/blobdiff - htmlfilter_test.py
Strip all  
[paperdoorknob] / htmlfilter_test.py
diff --git a/htmlfilter_test.py b/htmlfilter_test.py
new file mode 100644 (file)
index 0000000..6b5584c
--- /dev/null
@@ -0,0 +1,23 @@
+# paperdoorknob: Print glowfic
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, version 3.
+
+
+import unittest
+from htmlfilter import ApplyHTMLFilters
+
+
+class TestHTMLFilters(unittest.TestCase):
+
+    def testStripNBSP(self) -> None:
+        self.assertEqual(
+            ApplyHTMLFilters(
+                "NoNBSP",
+                b"<p>It's&nbsp;<em>really&nbsp;</em>cold.</p>"),
+            b"<p>It's <em>really </em>cold.</p>")
+
+
+if __name__ == '__main__':
+    unittest.main()