diff --git a/django_ripozo_tests/helpers/common.py b/django_ripozo_tests/helpers/common.py index 21647e8..0aef7d6 100644 --- a/django_ripozo_tests/helpers/common.py +++ b/django_ripozo_tests/helpers/common.py @@ -5,8 +5,6 @@ from django.core.management import call_command -from ripozo.tests.python2base import TestBase - import cProfile import django import random @@ -42,7 +40,7 @@ def random_string(length=50): return ''.join(random.choice(string.ascii_letters) for _ in range(length)) -class UnittestBase(TestBase): +class UnittestBase(object): @classmethod def setUpClass(cls): try: diff --git a/django_ripozo_tests/integration/basic.py b/django_ripozo_tests/integration/basic.py index 57bc49a..bb1cbc6 100644 --- a/django_ripozo_tests/integration/basic.py +++ b/django_ripozo_tests/integration/basic.py @@ -10,12 +10,12 @@ import json import logging import six -import unittest +import unittest2 logger = logging.getLogger(__name__) -class TestBasic(UnittestBase, unittest.TestCase): +class TestBasic(UnittestBase, unittest2.TestCase): def setUp(self): self.client = Client() diff --git a/django_ripozo_tests/unit/dispatcher.py b/django_ripozo_tests/unit/dispatcher.py index 455327b..28de2a6 100644 --- a/django_ripozo_tests/unit/dispatcher.py +++ b/django_ripozo_tests/unit/dispatcher.py @@ -7,10 +7,10 @@ from django_ripozo_tests.helpers.common import UnittestBase -import unittest +import unittest2 -class TestDispatcher(UnittestBase, unittest.TestCase): +class TestDispatcher(UnittestBase, unittest2.TestCase): def test_base_url(self): """ Tests the base_url property diff --git a/django_ripozo_tests/unit/manager.py b/django_ripozo_tests/unit/manager.py index 7b70cae..a1ff2fa 100644 --- a/django_ripozo_tests/unit/manager.py +++ b/django_ripozo_tests/unit/manager.py @@ -23,7 +23,7 @@ import random import string import six -import unittest +import unittest2 def random_string(): @@ -38,7 +38,7 @@ def random_bool(): return random.choice([True, False]) -class TestDjangoManager(UnittestBase, unittest.TestCase): +class TestDjangoManager(UnittestBase, unittest2.TestCase): def setUp(self): class MyMangaer(DjangoManager): model = MyModel diff --git a/django_ripozo_tests/unit/method_router.py b/django_ripozo_tests/unit/method_router.py index 16383ba..9999889 100644 --- a/django_ripozo_tests/unit/method_router.py +++ b/django_ripozo_tests/unit/method_router.py @@ -11,10 +11,10 @@ from django_ripozo_tests.helpers.common import UnittestBase import mock -import unittest +import unittest2 -class TestDispatcher(UnittestBase, unittest.TestCase): +class TestDispatcher(UnittestBase, unittest2.TestCase): """ unit tests for the ``MethodRouter`` class """ diff --git a/django_ripozo_tests/unit/onetomanymanager.py b/django_ripozo_tests/unit/onetomanymanager.py index 4b3ab08..0262b5b 100644 --- a/django_ripozo_tests/unit/onetomanymanager.py +++ b/django_ripozo_tests/unit/onetomanymanager.py @@ -9,10 +9,10 @@ from testapp.models import OneToMany, ManyToOne -import unittest +import unittest2 -class TestDjangoManager(UnittestBase, unittest.TestCase): +class TestDjangoManager(UnittestBase, unittest2.TestCase): def setUp(self): class OneManager(DjangoManager): model = OneToMany diff --git a/setup.py b/setup.py index 9878f18..7405bda 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,8 @@ 'Topic :: Software Development :: Libraries :: Python Modules', ], tests_require=[ - 'mock' + 'mock', + 'unittest2' ], test_suite='django_ripozo_tests' ) \ No newline at end of file