From 4bf3680dfadec3de5c3d4c4381a7c2960ea96afe Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Wed, 15 Aug 2007 11:29:58 +0000 Subject: [PATCH] If SITE_ID isn't in the test settings, fake it. We need the sites framework, but the value of SITE_ID is currently unimportant, so we can transparently fix this error. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5893 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/runtests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/runtests.py b/tests/runtests.py index 56679ecb7c..8110f5521d 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -94,6 +94,8 @@ def django_tests(verbosity, interactive, test_labels): 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.common.CommonMiddleware', ) + if not hasattr(settings, 'SITE_ID'): + settings.SITE_ID = 1 # Load all the ALWAYS_INSTALLED_APPS. # (This import statement is intentionally delayed until after we