From 15f42cc92a865dd0f3a39e73e9ffdd6262bde7dd Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 22 Dec 2009 06:00:57 +0000 Subject: [PATCH] Corrected the tests for DjangoTestRunner so they pass under Postgres. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11937 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/test_runner/tests.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/regressiontests/test_runner/tests.py b/tests/regressiontests/test_runner/tests.py index af8a29328a..d8db7baf94 100644 --- a/tests/regressiontests/test_runner/tests.py +++ b/tests/regressiontests/test_runner/tests.py @@ -4,25 +4,25 @@ Tests for django test runner import StringIO import unittest import django -from django.test import TestCase, TransactionTestCase, simple +from django.test import simple + +class DjangoTestRunnerTests(unittest.TestCase): -class DjangoTestRunnerTests(TestCase): - def test_failfast(self): - class MockTestOne(TransactionTestCase): + class MockTestOne(unittest.TestCase): def runTest(self): assert False - class MockTestTwo(TransactionTestCase): + class MockTestTwo(unittest.TestCase): def runTest(self): assert False - + suite = unittest.TestSuite([MockTestOne(), MockTestTwo()]) mock_stream = StringIO.StringIO() dtr = simple.DjangoTestRunner(verbosity=0, failfast=False, stream=mock_stream) result = dtr.run(suite) self.assertEqual(2, result.testsRun) self.assertEqual(2, len(result.failures)) - + dtr = simple.DjangoTestRunner(verbosity=0, failfast=True, stream=mock_stream) result = dtr.run(suite) self.assertEqual(1, result.testsRun)