diff options
Diffstat (limited to 'django/test/utils.py')
-rw-r--r-- | django/test/utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/django/test/utils.py b/django/test/utils.py index ae3798634e..bc53ef4bfb 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -90,6 +90,10 @@ def get_postgresql_create_suffix(): return '' def create_test_db(verbosity=1, autoclobber=False): + """ + Creates a test database, prompting the user for confirmation if the + database already exists. Returns the name of the test database created. + """ # 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"): @@ -153,6 +157,8 @@ def create_test_db(verbosity=1, autoclobber=False): # the side effect of initializing the test database. cursor = connection.cursor() + return TEST_DATABASE_NAME + 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() |