Fixed the get_or_create tests for postgreSQL, by using

TransactionTestCase.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2010-09-12 22:03:44 +00:00
parent 720299053a
commit 1e7b2f5a06
1 changed files with 2 additions and 2 deletions

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)