@@ 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):