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
This commit is contained in:
Malcolm Tredinnick 2007-08-15 11:29:58 +00:00
parent ba29b7a97b
commit 4bf3680dfa
1 changed files with 2 additions and 0 deletions

View File

@ -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