diff options
Diffstat (limited to 'django_testscenarios/ubertest.py')
-rw-r--r-- | django_testscenarios/ubertest.py | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/django_testscenarios/ubertest.py b/django_testscenarios/ubertest.py index b973cc6..cd7ccd7 100644 --- a/django_testscenarios/ubertest.py +++ b/django_testscenarios/ubertest.py @@ -79,30 +79,27 @@ class ScenarioAwareTestCaseIdStrReprMixIn(object): return str(self) -class TransactionTestCase( - ScenarioAwareTestCaseIdStrReprMixIn, - testtools.TestCase, - django.test.TransactionTestCase): +class TransactionTestCase(ScenarioAwareTestCaseIdStrReprMixIn, + testtools.TestCase, + django.test.TransactionTestCase): """ Django TransactionTestCase with testtools power. """ -class TestCase( +class TestCase(django.test.TestCase, + TransactionTestCase): # XXX: Inheritance order is very important! # See comment next to TestCaseWithScenarios - django.test.TestCase, - TransactionTestCase): """ Django TestCase with testtools power. """ -class TransactionTestCaseWithScenarios( - ScenarioAwareTestCaseIdStrReprMixIn, - testtools.TestCase, - testscenarios.TestWithScenarios, - django.test.TransactionTestCase): +class TransactionTestCaseWithScenarios(ScenarioAwareTestCaseIdStrReprMixIn, + testtools.TestCase, + testscenarios.TestWithScenarios, + django.test.TransactionTestCase): """ Django TransactionTestCase with testtools power and scenario support. """ @@ -162,7 +159,8 @@ class TransactionTestCaseWithScenarios( return super(TransactionTestCaseWithScenarios, self).run(result) -class TestCaseWithScenarios( +class TestCaseWithScenarios(django.test.TestCase, + TransactionTestCaseWithScenarios): # XXX: As in Django we mimic important implementation detail. # Inheritance order is important for non-obvious reasons. @@ -179,8 +177,6 @@ class TestCaseWithScenarios( # # Hence, our implementation makes the TransactionTestCase the base # class and the plain TestCase derived class. - django.test.TestCase, - TransactionTestCaseWithScenarios): """ Django TestCase with testtools power and scenario support. """ |