~netlandish/django-wiki

ef5ebd09c44ae4717ebf9469b0ebb6545e19fcdd — Benjamin Bach 6 years ago 6c801b2
Update test_markdown.py
1 files changed, 8 insertions(+), 0 deletions(-)

M tests/plugins/images/test_markdown.py
M tests/plugins/images/test_markdown.py => tests/plugins/images/test_markdown.py +8 -0
@@ 8,9 8,17 @@ class ImageMarkdownTests(RequireRootArticleMixin, TestBase):
        md_text = md.convert("[image:1 align:left]")
        self.assertIn("<figure", md_text)
        self.assertNotIn("[image:1 align:left]", md_text)
        md_text = md.convert("image: [image:1 align:left]\nadasd")
        self.assertIn("<figure", md_text)
        md_text = md.convert("image: [image:1 align:right medium]\nadasd")
        self.assertIn("<img src", md_text)
        md_text = md.convert("image: [image:123 align:left medium]\nadasd")
        self.assertIn("Image not found", md_text)

    def test_escape(self):
        md = markdown.ArticleMarkdown(article=self.root_article)
        md_text = md.convert("`[image:1 align:left]`")
        self.assertNotIn("<figure", md_text)
        self.assertIn("[image:1 align:left]", md_text)
        md_text = md.convert("`image tag: [image:1]`")
        self.assertIn("image tag: [image:1]", md_text)