summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-08-15 11:29:58 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-08-15 11:29:58 +0000
commit4bf3680dfadec3de5c3d4c4381a7c2960ea96afe (patch)
treeb761d64acf4878650d24f21a23ddfacc299aa347 /tests
parentba29b7a97b5ebb6e7e5d78829d9f5b315fb03208 (diff)
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
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.py2
1 files changed, 2 insertions, 0 deletions
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