]> git.scottworley.com Git - paperdoorknob/blobdiff - glowfic_test.py
Show name of thread being processed
[paperdoorknob] / glowfic_test.py
index d3a6d563f8930150eb32296ceb1973afb96d3af8..2d01c2a7e85b2d272fb60ed4dafcb657be72440e 100644 (file)
@@ -11,6 +11,7 @@ from bs4 import BeautifulSoup
 
 from images import FakeImageStore
 from glowfic import chunkDOMs, makeChunk
 
 from images import FakeImageStore
 from glowfic import chunkDOMs, makeChunk
+from texify import PandocTexifier
 
 
 class TestSplit(unittest.TestCase):
 
 
 class TestSplit(unittest.TestCase):
@@ -57,12 +58,19 @@ class TestMakeChunk(unittest.TestCase):
             c.icon,
             'stored:https://d1anwqy6ci9o1i.cloudfront.net/' +
             'users%2F366%2Ficons%2Fxqmypqvflgdy28aorw9ml_shock.png')
             c.icon,
             'stored:https://d1anwqy6ci9o1i.cloudfront.net/' +
             'users%2F366%2Ficons%2Fxqmypqvflgdy28aorw9ml_shock.png')
-        self.assertEqual(c.character, 'Keltham')
-        self.assertEqual(c.screen_name, 'lawful chaotic')
-        self.assertEqual(c.author, 'Iarwain')
+        assert c.character
+        assert c.screen_name
+        assert c.author
+        self.assertEqual(list(c.character.stripped_strings), ['Keltham'])
+        self.assertEqual(
+            list(c.screen_name.stripped_strings), ['lawful chaotic'])
+        self.assertEqual(list(c.author.stripped_strings), ['Iarwain'])
         self.assertEqual(str(c.content),
                          '<div class="post-content"><p></p></div>')
 
         self.assertEqual(str(c.content),
                          '<div class="post-content"><p></p></div>')
 
+        self.assertEqual(
+            PandocTexifier("pandoc").texify(c.character), b'{Keltham}\n')
+
 
 if __name__ == '__main__':
     unittest.main()
 
 if __name__ == '__main__':
     unittest.main()