mirror of https://github.com/django/django.git
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:
parent
720299053a
commit
1e7b2f5a06
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue