mirror of https://github.com/django/django.git
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:
parent
ba29b7a97b
commit
4bf3680dfa
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue