From fa35d2bd4d0c941fda8d0e54af59700589cd725f Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 12 Sep 2010 22:16:36 +0000 Subject: [PATCH] [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 --- tests/modeltests/get_or_create/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modeltests/get_or_create/tests.py b/tests/modeltests/get_or_create/tests.py index 3323c88a82..1999b20c76 100644 --- a/tests/modeltests/get_or_create/tests.py +++ b/tests/modeltests/get_or_create/tests.py @@ -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)