def test_plantuml(self):
     """
     Test the support of 'plantuml' language
     """
     text = MarkdownBuilder('```plantuml').diagram('A --> B').build()
     self.assertEqual(self._stripImageData(self._load_file('png_diag.html')),
                      self._stripImageData(self.md.convert(text)))
 def test_tildes(self):
     """
     Test correct parsing with tilde fenced block delimiter
     """
     self.text_builder = MarkdownBuilder('~~~uml')
     text = self.text_builder.text('Paragraph before.\n\n') \
         .diagram('A --> B') \
         .text('\nParagraph after.') \
         .build()
     self.assertEqual('<p>Paragraph before.</p>\n'
                      '<p><img alt="uml diagram" class="uml" src="data:image/png;base64,%s" title="" /></p>\n'
                      '<p>Paragraph after.</p>' % self.FAKE_IMAGE,
                      self._stripImageData(self.md.convert(text)))
Пример #3
0
 def setUp(self):
     super(PlantumlTest_fenced, self).setUp()
     # Setup testing with backticks fenced block delimiter
     self.text_builder = MarkdownBuilder()
 def setUp(self):
     super(PlantumlTest_legacy, self).setUp()
     # Setup testing with old block delimiter (I don't remember where I've seen this syntax)
     self.text_builder = MarkdownBuilder('::uml::')