Django

Code

Show
Ignore:
Timestamp:
06/25/07 07:47:19 (2 years ago)
Author:
mtredinnick
Message:

unicode: Merged from trunk up to [5530]. Oracle backend has not been ported to
support unicode yet.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/unicode

    • Property svnmerge-integrated changed from /django/trunk:1-5460 to /django/trunk:1-5530
  • django/branches/unicode/django/test/utils.py

    r5487 r5531  
    11import sys, time 
    22from django.conf import settings 
    3 from django.db import connection, transaction, backend 
     3from django.db import connection, backend, get_creation_module 
     4from django.core import management, mail 
    45from django.core import management, mail 
    56from django.dispatch import dispatcher 
     
    8990 
    9091def create_test_db(verbosity=1, autoclobber=False): 
     92    # If the database backend wants to create the test DB itself, let it 
     93    creation_module = get_creation_module() 
     94    if hasattr(creation_module, "create_test_db"): 
     95        creation_module.create_test_db(settings, connection, backend, verbosity, autoclobber) 
     96        return 
     97     
    9198    if verbosity >= 1: 
    9299        print "Creating test database..." 
     
    143150 
    144151def destroy_test_db(old_database_name, verbosity=1): 
     152    # If the database wants to drop the test DB itself, let it 
     153    creation_module = get_creation_module() 
     154    if hasattr(creation_module, "destroy_test_db"): 
     155        creation_module.destroy_test_db(settings, connection, backend, old_database_name, verbosity) 
     156        return 
     157     
    145158    # Unless we're using SQLite, remove the test database to clean up after 
    146159    # ourselves. Connect to the previous database (not the test database)