Django

Code

Changeset 5910

Show
Ignore:
Timestamp:
08/16/07 17:46:00 (1 year ago)
Author:
adrian
Message:

Changed django.test.utils.create_test_db to return the name of the test database that was created

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/test/utils.py

    r5899 r5910  
    9191 
    9292def create_test_db(verbosity=1, autoclobber=False): 
     93    """ 
     94    Creates a test database, prompting the user for confirmation if the 
     95    database already exists. Returns the name of the test database created. 
     96    """ 
    9397    # If the database backend wants to create the test DB itself, let it 
    9498    creation_module = get_creation_module() 
     
    154158    cursor = connection.cursor() 
    155159 
     160    return TEST_DATABASE_NAME 
     161 
    156162def destroy_test_db(old_database_name, verbosity=1): 
    157163    # If the database wants to drop the test DB itself, let it 
  • django/trunk/docs/testing.txt

    r5904 r5910  
    989989    ``settings.DATABASE_NAME`` to match the name of the test database. 
    990990 
     991    New in the Django development version, this function returns the name of 
     992    the test database that it created. 
     993 
    991994``destroy_test_db(old_database_name, verbosity=1)`` 
    992995    Destroys the database whose name is in the ``DATABASE_NAME`` setting