summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2010-09-12 22:16:36 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2010-09-12 22:16:36 +0000
commitfa35d2bd4d0c941fda8d0e54af59700589cd725f (patch)
tree8a0b8fcf387e33fa4cedabda15a0c3a3e1a1ec1a
parent0c65a6f7daaffb99e8269c4884b341ee1266a102 (diff)
[1.2.X] Fixed the get_or_create tests for postgreSQL, by using
TransactionTestCase. Backport of r13814 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13815 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/modeltests/get_or_create/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/modeltests/get_or_create/tests.py b/tests/modeltests/get_or_create/tests.py
index 3323c88a82..1999b20c76 100644
--- a/tests/modeltests/get_or_create/tests.py
+++ b/tests/modeltests/get_or_create/tests.py
@@ -1,12 +1,12 @@
from datetime import date
from django.db import IntegrityError
-from django.test import TestCase
+from django.test import TransactionTestCase
from models import Person, ManualPrimaryKeyTest
-class GetOrCreateTests(TestCase):
+class GetOrCreateTests(TransactionTestCase):
def test_get_or_create(self):
p = Person.objects.create(
first_name='John', last_name='Lennon', birthday=date(1940, 10, 9)