From e8a394549113c6d99b24cbf0bcb527108032f49a Mon Sep 17 00:00:00 2001 From: Christian Duvholt Date: Sun, 11 Sep 2016 15:35:40 +0200 Subject: [PATCH] Use mock instead of unittest.mock unittest.mock was added in Python 3.3 --- tox.ini | 3 ++- wiki/tests/test_markdown.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 43490cf5..4d9556ab 100644 --- a/tox.ini +++ b/tox.ini @@ -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 diff --git a/wiki/tests/test_markdown.py b/wiki/tests/test_markdown.py index 3ae30ef3..d95a325f 100644 --- a/wiki/tests/test_markdown.py +++ b/wiki/tests/test_markdown.py @@ -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) -- 2.45.2