1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

[boulder-oracle-sprint] fixed django.test.utils test db creation method delegation to match new API from [3991]

git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@3992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2006-11-04 22:42:33 +00:00
parent 6131a839da
commit fcf3cd39eb

View File

@ -1,6 +1,6 @@
import sys, time
from django.conf import settings
from django.db import connection, transaction, backend, get_creation_module
from django.db import connection, backend, get_creation_module
from django.dispatch import dispatcher
from django.test import signals
from django.template import Template
@ -46,7 +46,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(verbosity, autoclobber)
creation_module.create_test_db(settings, connection, backend, verbosity, autoclobber)
if verbosity >= 1:
print "Creating test database..."
@ -97,7 +97,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(old_database_name, verbosity=1)
creation_module.destroy_test_db(settings, connection, backend, old_database_name, verbosity)
# Unless we're using SQLite, remove the test database to clean up after
# ourselves. Connect to the previous database (not the test database)