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
This commit is contained in:
Justin Bronn 2008-08-11 17:54:44 +00:00
parent 8ad96b4d29
commit 1613903906
2 changed files with 2 additions and 3 deletions

View File

@ -40,7 +40,7 @@ def _create_with_cursor(db_name, verbosity=1, autoclobber=False):
create_sql += ' OWNER %s' % settings.DATABASE_USER create_sql += ' OWNER %s' % settings.DATABASE_USER
cursor = connection.cursor() cursor = connection.cursor()
connection.creation.set_autocommit(connection) connection.creation.set_autocommit()
try: try:
# Trying to create the database first. # Trying to create the database first.

View File

@ -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.db.backend import create_spatial_db
from django.contrib.gis.tests.utils import mysql from django.contrib.gis.tests.utils import mysql
from django.db import connection from django.db import connection
from django.test.utils import destroy_test_db
# Getting initial values. # Getting initial values.
old_debug = settings.DEBUG old_debug = settings.DEBUG
@ -136,7 +135,7 @@ def run_tests(module_list, verbosity=1, interactive=True):
result = TextTestRunner(verbosity=verbosity).run(test_suite) result = TextTestRunner(verbosity=verbosity).run(test_suite)
# Cleaning up, destroying the test spatial database and resetting the INSTALLED_APPS. # 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.DEBUG = old_debug
settings.INSTALLED_APPS = old_installed settings.INSTALLED_APPS = old_installed