From fb31d4002b3bd192c320d167f1d2fca8f1bd929d Mon Sep 17 00:00:00 2001 From: Christian Duvholt Date: Sun, 11 Sep 2016 15:22:43 +0200 Subject: [PATCH] Add failing testcase for article extensions --- wiki/tests/test_markdown.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wiki/tests/test_markdown.py b/wiki/tests/test_markdown.py index d02914a3..3ae30ef3 100644 --- a/wiki/tests/test_markdown.py +++ b/wiki/tests/test_markdown.py @@ -2,7 +2,18 @@ from __future__ import absolute_import, unicode_literals from django.test import TestCase import markdown +from wiki.core.markdown import ArticleMarkdown from wiki.core.markdown.mdx.responsivetable import ResponsiveTableExtension +from unittest.mock import patch + +class ArticleMarkdownTests(TestCase): + @patch('wiki.core.markdown.settings') + def test_do_not_modify_django_settings(self, settings): + extensions = ['footnotes', 'attr_list', 'sane_lists'] + settings.MARKDOWN_KWARGS = {'extensions': extensions} + number_of_extensions = len(extensions) + ArticleMarkdown(None) + self.assertEqual(len(extensions), number_of_extensions) class ResponsiveTableTests(TestCase): def setUp(self): -- 2.45.2