Ticket #5453: test_database_name.diff

File test_database_name.diff, 1.2 KB (added by mcroydon, 17 years ago)

Patch to make TEST_DATABASE_NAME behavior match documentation

  • Users/mcroydon/code/python/sprint/django-trunk/tests/runtests.py

     
    1515MODEL_TESTS_DIR_NAME = 'modeltests'
    1616REGRESSION_TESTS_DIR_NAME = 'regressiontests'
    1717
    18 TEST_DATABASE_NAME = 'django_test_db'
    1918TEST_TEMPLATE_DIR = 'templates'
    2019
    2120CONTRIB_DIR = os.path.dirname(contrib.__file__)
     
    9796    old_middleware_classes = settings.MIDDLEWARE_CLASSES
    9897
    9998    # Redirect some settings for the duration of these tests.
    100     settings.TEST_DATABASE_NAME = TEST_DATABASE_NAME
    10199    settings.INSTALLED_APPS = ALWAYS_INSTALLED_APPS
    102100    settings.ROOT_URLCONF = 'urls'
    103101    settings.TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), TEST_TEMPLATE_DIR),)
     
    150148
    151149    # Restore the old settings.
    152150    settings.INSTALLED_APPS = old_installed_apps
    153     settings.TESTS_DATABASE_NAME = old_test_database_name
    154151    settings.ROOT_URLCONF = old_root_urlconf
    155152    settings.TEMPLATE_DIRS = old_template_dirs
    156153    settings.USE_I18N = old_use_i18n
Back to Top