Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)