+class TestMakeChunk(unittest.TestCase):
+
+ def testEmptyContent(self) -> None:
+ with open('testdata/empty-content.html', 'rb') as f:
+ soup = BeautifulSoup(f, 'html.parser')
+ c = makeChunk(next(iter(chunkDOMs(soup))), FakeImageStore())
+ self.assertEqual(
+ 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')
+ self.assertEqual(str(c.content),
+ '<div class="post-content"><p></p></div>')
+
+