~netlandish/django-wiki

e8a394549113c6d99b24cbf0bcb527108032f49a — Christian Duvholt 8 years ago f08ce1e
Use mock instead of unittest.mock

unittest.mock was added in Python 3.3
2 files changed, 4 insertions(+), 3 deletions(-)

M tox.ini
M wiki/tests/test_markdown.py
M tox.ini => tox.ini +2 -1
@@ 12,7 12,8 @@ deps =
     pytest
     Pillow==2.3.0
     django-classy-tags==0.4
     six==1.6.1
     six>=1.9
     mock>=2.0
     django_nyt==0.9.8
     django15: Django==1.5.12
     django16: Django==1.6.11

M wiki/tests/test_markdown.py => wiki/tests/test_markdown.py +2 -2
@@ 4,11 4,11 @@ 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
from mock import patch

class ArticleMarkdownTests(TestCase):
    @patch('wiki.core.markdown.settings')
    def test_do_not_modify_django_settings(self, settings):
    def test_do_not_modify_extensions(self, settings):
        extensions = ['footnotes', 'attr_list', 'sane_lists']
        settings.MARKDOWN_KWARGS = {'extensions': extensions}
        number_of_extensions = len(extensions)