1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Changed backend create_test_db() and destroy_test_db() hooks NOT to take the backend as an argument, as the backend as an object is going away

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2007-08-20 03:16:55 +00:00
parent f0decc18cf
commit b3912d3609
2 changed files with 5 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
import sys, time
from django.conf import settings
from django.db import connection, backend, get_creation_module
from django.db import connection, get_creation_module
from django.core import mail
from django.core.management import call_command
from django.dispatch import dispatcher
@@ -97,7 +97,7 @@ def create_test_db(verbosity=1, autoclobber=False):
# If the database backend wants to create the test DB itself, let it
creation_module = get_creation_module()
if hasattr(creation_module, "create_test_db"):
creation_module.create_test_db(settings, connection, backend, verbosity, autoclobber)
creation_module.create_test_db(settings, connection, verbosity, autoclobber)
return
if verbosity >= 1:
@@ -165,7 +165,7 @@ def destroy_test_db(old_database_name, verbosity=1):
# If the database wants to drop the test DB itself, let it
creation_module = get_creation_module()
if hasattr(creation_module, "destroy_test_db"):
creation_module.destroy_test_db(settings, connection, backend, old_database_name, verbosity)
creation_module.destroy_test_db(settings, connection, old_database_name, verbosity)
return
# Unless we're using SQLite, remove the test database to clean up after