[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
This commit is contained in:
Malcolm Tredinnick 2010-09-12 22:16:36 +00:00
parent 0c65a6f7da
commit fa35d2bd4d

View File

@ -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)