diff --git a/tests/requirements.txt b/tests/requirements.txt index ac59224..5eb9697 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -6,4 +6,3 @@ dj-email-url dj-search-url django-cache-url>=1.0.0 six -unittest2 diff --git a/tests/test_main.py b/tests/test_main.py index e6e1dd2..b7e374c 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,13 +1,17 @@ import os import subprocess import sys -import unittest2 from django import VERSION as DJANGO_VERSION from django.conf import global_settings from django.test import TestCase from django.core.exceptions import ImproperlyConfigured +if sys.version_info >= (2, 7): + from unittest import skipIf +else: + from django.utils.unittest import skipIf + from mock import patch from configurations.importer import ConfigurationImporter @@ -111,7 +115,7 @@ class MainTests(TestCase): stdout=subprocess.PIPE) self.assertIn('--configuration', proc.communicate()[0].decode('utf-8')) - @unittest2.skipIf(DJANGO_VERSION >= (1, 10), 'only applies to Django < 1.10') + @skipIf(DJANGO_VERSION >= (1, 10), 'only applies to Django < 1.10') def test_deprecated_option_list_command(self): """ Verify that the configuration option is correctly added to any