summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/test/simple.py3
-rw-r--r--django/test/utils.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/django/test/simple.py b/django/test/simple.py
index e72f693459..2469f80b3a 100644
--- a/django/test/simple.py
+++ b/django/test/simple.py
@@ -61,7 +61,8 @@ def run_tests(module_list, verbosity=1, extra_tests=[]):
for test in extra_tests:
suite.addTest(test)
- old_name = create_test_db(verbosity)
+ old_name = settings.DATABASE_NAME
+ create_test_db(verbosity)
management.syncdb(verbosity, interactive=False)
unittest.TextTestRunner(verbosity=verbosity).run(suite)
destroy_test_db(old_name, verbosity)
diff --git a/django/test/utils.py b/django/test/utils.py
index dd48d95aea..be011b864c 100644
--- a/django/test/utils.py
+++ b/django/test/utils.py
@@ -50,14 +50,11 @@ def create_test_db(verbosity=1, autoclobber=False):
sys.exit(1)
connection.close()
- old_database_name = settings.DATABASE_NAME
settings.DATABASE_NAME = TEST_DATABASE_NAME
# Get a cursor (even though we don't need one yet). This has
# the side effect of initializing the test database.
cursor = connection.cursor()
-
- return old_database_name
def destroy_test_db(old_database_name, verbosity=1):
# Unless we're using SQLite, remove the test database to clean up after