diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-05-16 21:28:06 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-05-16 21:28:06 +0000 |
| commit | c643e12faf85478149386768d278c44936aa99a3 (patch) | |
| tree | 30bc4a192e8e768f616157a7c9ad43ef6f775a2b /tests | |
| parent | 27612d8b7d9263d883b83331883c7bbe862122e0 (diff) | |
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
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/othertests/templates.py | 1 | ||||
| -rwxr-xr-x | tests/runtests.py | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/othertests/templates.py b/tests/othertests/templates.py index 6d8487c67a..ed7105bb71 100644 --- a/tests/othertests/templates.py +++ b/tests/othertests/templates.py @@ -507,4 +507,5 @@ def run_tests(verbosity=0, standalone=False): raise Exception, msg if __name__ == "__main__": + settings.configure() run_tests(1, True) diff --git a/tests/runtests.py b/tests/runtests.py index 3f8eda6ab4..a1b595fba6 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -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()] |
