Skip to content

Commit

Permalink
unittest2 integration
Browse files Browse the repository at this point in the history
  • Loading branch information
timmartin19 committed Jun 9, 2015
1 parent 34d3fae commit e7ad467
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
4 changes: 1 addition & 3 deletions django_ripozo_tests/helpers/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

from django.core.management import call_command

from ripozo.tests.python2base import TestBase

import cProfile
import django
import random
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions django_ripozo_tests/integration/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions django_ripozo_tests/unit/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions django_ripozo_tests/unit/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import random
import string
import six
import unittest
import unittest2


def random_string():
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions django_ripozo_tests/unit/method_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
4 changes: 2 additions & 2 deletions django_ripozo_tests/unit/onetomanymanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
'Topic :: Software Development :: Libraries :: Python Modules',
],
tests_require=[
'mock'
'mock',
'unittest2'
],
test_suite='django_ripozo_tests'
)

0 comments on commit e7ad467

Please sign in to comment.