bgneal@290: """ bgneal@290: Tests for legacy app functions. bgneal@290: """ bgneal@290: bgneal@290: from django.test import TestCase bgneal@290: bgneal@290: from legacy.phpbb import unphpbb bgneal@290: from legacy.html2md import MarkdownWriter bgneal@290: bgneal@290: class UnPhpBbTest(TestCase): bgneal@290: bgneal@290: def test_unentities(self): bgneal@290: s1 = ""Look! No head!" - Laika & The Cosmonauts" bgneal@290: s2 = unphpbb(s1) bgneal@290: s3 = u'"Look! No head!" - Laika & The Cosmonauts' bgneal@290: self.failUnlessEqual(s2, s3) bgneal@290: bgneal@290: def test_rem_uuid1(self): bgneal@290: s1 = ("[url=http://www.thesurfites.com][color=black:3fdb565c83]" bgneal@290: "T H E - S U R F I T E S[/color:3fdb565c83][/url]") bgneal@290: s2 = unphpbb(s1) bgneal@290: s3 = (u'[url=http://www.thesurfites.com][color=black]' bgneal@290: 'T H E - S U R F I T E S[/color][/url]') bgneal@290: self.failUnlessEqual(s2, s3) bgneal@290: bgneal@290: bgneal@290: class Html2MdTest(TestCase): bgneal@290: bgneal@290: def test_sig1(self): bgneal@290: s1 = """
Pollo Del Mar
bgneal@290: Frankie & The Pool Boys
bgneal@290: PDM on FaceBook
bgneal@290: