From 161390390639bc6166a0d5f1e0f4c66952737a0b Mon Sep 17 00:00:00 2001 From: Justin Bronn Date: Mon, 11 Aug 2008 17:54:44 +0000 Subject: [PATCH] Fixed the `gis` test suite, finished conversions missed in r8296. Thanks, robotika. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8308 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/gis/db/backend/postgis/creation.py | 2 +- django/contrib/gis/tests/__init__.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/django/contrib/gis/db/backend/postgis/creation.py b/django/contrib/gis/db/backend/postgis/creation.py index daaeae6508..9da984e906 100644 --- a/django/contrib/gis/db/backend/postgis/creation.py +++ b/django/contrib/gis/db/backend/postgis/creation.py @@ -40,7 +40,7 @@ def _create_with_cursor(db_name, verbosity=1, autoclobber=False): create_sql += ' OWNER %s' % settings.DATABASE_USER cursor = connection.cursor() - connection.creation.set_autocommit(connection) + connection.creation.set_autocommit() try: # Trying to create the database first. diff --git a/django/contrib/gis/tests/__init__.py b/django/contrib/gis/tests/__init__.py index 3584274a4c..ee0a803f9d 100644 --- a/django/contrib/gis/tests/__init__.py +++ b/django/contrib/gis/tests/__init__.py @@ -94,7 +94,6 @@ def run_tests(module_list, verbosity=1, interactive=True): from django.contrib.gis.db.backend import create_spatial_db from django.contrib.gis.tests.utils import mysql from django.db import connection - from django.test.utils import destroy_test_db # Getting initial values. old_debug = settings.DEBUG @@ -136,7 +135,7 @@ def run_tests(module_list, verbosity=1, interactive=True): result = TextTestRunner(verbosity=verbosity).run(test_suite) # Cleaning up, destroying the test spatial database and resetting the INSTALLED_APPS. - destroy_test_db(old_name, verbosity) + connection.creation.destroy_test_db(old_name, verbosity) settings.DEBUG = old_debug settings.INSTALLED_APPS = old_installed