def test_bodyRendererEmptyBody(self): """ L{BlurbViewer.body} should be able to render Blurbs with empty bodies. """ body = u'' view = BlurbViewer(self._makeBlurb(hyperblurb.FLAVOR.BLOG, None, body)) result = flatten(view.body(None, None)) self.assertEqual(result, body)
def test_bodyRenderer(self): """ L{BlurbViewer.body} should return a well-formed XHTML document fragment even if the body of the blurb being rendered is not well-formed. """ body = u'<i>hello' expectedBody = u'<i>hello</i><br />' view = BlurbViewer(self._makeBlurb(hyperblurb.FLAVOR.BLOG, None, body)) result = flatten(view.body(None, None)) self.assertEqual(result, expectedBody)