def test_convert(self): """should convert a string to markdown""" plugin = Plugin(self.site, self.config) plugin.convert(self.entity) self.assertNotEqual(self.entity.content, None) self.assertEqual(self.entity.content, "<p>foobar</p>\n")
def test_convert_syntax(self): """should add a code block""" self.config.options["markdown"]["extras"] = ["fenced-code-blocks"] self.entity.raw = RAW plugin = Plugin(self.site, self.config) plugin.convert(self.entity) self.assertNotEqual(self.entity.content, None) self.assertTrue("codehilite" in self.entity.content)