Fixed #5453 -- Fixed TEST_DATABASE_NAME handling to match documentation. Thanks, Matt Croydon.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ced90f4b81
commit
b7df720839
|
@ -15,7 +15,6 @@ CONTRIB_DIR_NAME = 'django.contrib'
|
||||||
MODEL_TESTS_DIR_NAME = 'modeltests'
|
MODEL_TESTS_DIR_NAME = 'modeltests'
|
||||||
REGRESSION_TESTS_DIR_NAME = 'regressiontests'
|
REGRESSION_TESTS_DIR_NAME = 'regressiontests'
|
||||||
|
|
||||||
TEST_DATABASE_NAME = 'django_test_db'
|
|
||||||
TEST_TEMPLATE_DIR = 'templates'
|
TEST_TEMPLATE_DIR = 'templates'
|
||||||
|
|
||||||
CONTRIB_DIR = os.path.dirname(contrib.__file__)
|
CONTRIB_DIR = os.path.dirname(contrib.__file__)
|
||||||
|
@ -97,7 +96,6 @@ def django_tests(verbosity, interactive, test_labels):
|
||||||
old_middleware_classes = settings.MIDDLEWARE_CLASSES
|
old_middleware_classes = settings.MIDDLEWARE_CLASSES
|
||||||
|
|
||||||
# Redirect some settings for the duration of these tests.
|
# Redirect some settings for the duration of these tests.
|
||||||
settings.TEST_DATABASE_NAME = TEST_DATABASE_NAME
|
|
||||||
settings.INSTALLED_APPS = ALWAYS_INSTALLED_APPS
|
settings.INSTALLED_APPS = ALWAYS_INSTALLED_APPS
|
||||||
settings.ROOT_URLCONF = 'urls'
|
settings.ROOT_URLCONF = 'urls'
|
||||||
settings.TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), TEST_TEMPLATE_DIR),)
|
settings.TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), TEST_TEMPLATE_DIR),)
|
||||||
|
@ -150,7 +148,6 @@ def django_tests(verbosity, interactive, test_labels):
|
||||||
|
|
||||||
# Restore the old settings.
|
# Restore the old settings.
|
||||||
settings.INSTALLED_APPS = old_installed_apps
|
settings.INSTALLED_APPS = old_installed_apps
|
||||||
settings.TESTS_DATABASE_NAME = old_test_database_name
|
|
||||||
settings.ROOT_URLCONF = old_root_urlconf
|
settings.ROOT_URLCONF = old_root_urlconf
|
||||||
settings.TEMPLATE_DIRS = old_template_dirs
|
settings.TEMPLATE_DIRS = old_template_dirs
|
||||||
settings.USE_I18N = old_use_i18n
|
settings.USE_I18N = old_use_i18n
|
||||||
|
|
Loading…
Reference in New Issue