Skip to content

Commit fa35d2b

Browse files
committed
[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
1 parent 0c65a6f commit fa35d2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/modeltests/get_or_create/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from datetime import date
22

33
from django.db import IntegrityError
4-
from django.test import TestCase
4+
from django.test import TransactionTestCase
55

66
from models import Person, ManualPrimaryKeyTest
77

88

9-
class GetOrCreateTests(TestCase):
9+
class GetOrCreateTests(TransactionTestCase):
1010
def test_get_or_create(self):
1111
p = Person.objects.create(
1212
first_name='John', last_name='Lennon', birthday=date(1940, 10, 9)

0 commit comments

Comments
 (0)