mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #1321 -- Made DJANGO_SETTINGS_MODULE optional. You can now call django.conf.settings.configure() to set settings manually if you don't have a settings module. Thanks, Malcolm Tredinnick, Luke Plant, Fredrik Lundh
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -73,6 +73,10 @@ class TestRunner:
|
||||
def run_tests(self):
|
||||
from django.conf import settings
|
||||
|
||||
# An empty access of the settings to force the default options to be
|
||||
# installed prior to assigning to them.
|
||||
settings.INSTALLED_APPS
|
||||
|
||||
# Manually set INSTALLED_APPS to point to the test models.
|
||||
settings.INSTALLED_APPS = [MODEL_TESTS_DIR_NAME + '.' + a for a in get_test_models()]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user