Permalink
Browse files

If SITE_ID isn't in the test settings, fake it. We need the sites fra…

…mework, 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
  • Loading branch information...
1 parent ba29b7a commit 4bf3680dfadec3de5c3d4c4381a7c2960ea96afe @malcolmt malcolmt committed Aug 15, 2007
Showing with 2 additions and 0 deletions.
  1. +2 −0 tests/runtests.py
View
@@ -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

0 comments on commit 4bf3680

Please sign in to comment.