-
-
-class LoadTests(testtools.TestCase):
-
- def test_simple(self):
- fd, name = tempfile.mkstemp()
- self.addCleanup(os.remove, name)
- f = os.fdopen(fd, 'w')
- f.write("""one
-two
-three\r
-
-for
-""")
- f.close()
- l = util.load_list(name)
- self.assertEquals(4, len(l))
- self.assertEquals("three", l[2])
-
-
-class StripHtmlTests(unittest.TestCase):
-
- def test_simple(self):
- self.assertEquals("", util.strip_html("<!--foo-->"))
- self.assertEquals("bar ", util.strip_html("<!--foo-->bar <!--bloe-->"))
- self.assertEquals("bar <bloe>", util.strip_html("<bar>bar <bloe></bar>"))
- self.assertEquals("", util.strip_html("<bar><bloe></bloe></bar>"))
-
- self.assertEquals("bla", util.strip_html("<a href=\"foo\">bla</a>"))