summaryrefslogtreecommitdiff
path: root/django/test/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/test/utils.py')
-rw-r--r--django/test/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/test/utils.py b/django/test/utils.py
index e0b2b0da6c..ce235a5cea 100644
--- a/django/test/utils.py
+++ b/django/test/utils.py
@@ -111,7 +111,8 @@ def setup_test_environment():
settings.EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
request._original_allowed_hosts = settings.ALLOWED_HOSTS
- settings.ALLOWED_HOSTS = ['*']
+ # Add the default host of the test client.
+ settings.ALLOWED_HOSTS = settings.ALLOWED_HOSTS + ['testserver']
mail.outbox = []