~netlandish/django-wiki

fb31d4002b3bd192c320d167f1d2fca8f1bd929d — Christian Duvholt 8 years ago 78f2afd
Add failing testcase for article extensions
1 files changed, 11 insertions(+), 0 deletions(-)

M wiki/tests/test_markdown.py
M wiki/tests/test_markdown.py => wiki/tests/test_markdown.py +11 -0
@@ 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):