Exemplo n.º 1
0
 def test_htmlcomment(self):
     shtml = htmlstrip.strip(HTMLCOMMENT_STRING)
     self.assertTrue(shtml.find("should_be_there") != -1, "deleted to much")
     self.assertTrue(shtml.find("should_also_be_there") != -1, "deleted to much")
     self.assertTrue(shtml.find("should_be_there_too") != -1, "deleted to much")
     self.assertTrue(shtml.find("comment_should_stay") != -1, "deleted browser switch")
     self.assertTrue(shtml.find("should_not_be_there") == -1, "did not delete comment")
Exemplo n.º 2
0
 def test_simpledoc(self):
     shtml = htmlstrip.strip(SIMPLEDOC_STRING)
     self.assertTrue(shtml != None, "strip returned None")
     self.assertTrue(len(shtml) < len(SIMPLEDOC_STRING), "compressed sting is not smaller")