1
0
mirror of https://github.com/django/django.git synced 2025-06-03 18:49:12 +00:00

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

View File

@ -1,12 +1,12 @@
from datetime import date from datetime import date
from django.db import IntegrityError from django.db import IntegrityError
from django.test import TestCase from django.test import TransactionTestCase
from models import Person, ManualPrimaryKeyTest from models import Person, ManualPrimaryKeyTest
class GetOrCreateTests(TestCase): class GetOrCreateTests(TransactionTestCase):
def test_get_or_create(self): def test_get_or_create(self):
p = Person.objects.create( p = Person.objects.create(
first_name='John', last_name='Lennon', birthday=date(1940, 10, 9) first_name='John', last_name='Lennon', birthday=date(1940, 10, 9)