﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19172	test_poisoned_http_host* tests failing when having ADMINS settings populated	bernardofontes	Claude Paroz	"After changing the ADMINS settings in the new security release, two tests broke. The output of the tests is:

{{{
$ manage test
Creating test database for alias 'default'...
..................................................................................FF......................................................................................................................................................................................................................................................................s........................................................................
======================================================================
FAIL: test_poisoned_http_host (django.contrib.auth.tests.views.PasswordResetTest)
Poisoned HTTP_HOST headers can't be used for reset emails
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/home/bernardo/virtualenvs/likeaboss/lib/python2.7/site-packages/django/contrib/auth/tests/views.py"", line 135, in test_poisoned_http_host
    self.assertEqual(len(mail.outbox), 0)
AssertionError: 1 != 0

======================================================================
FAIL: test_poisoned_http_host_admin_site (django.contrib.auth.tests.views.PasswordResetTest)
Poisoned HTTP_HOST headers can't be used for reset emails on admin views
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/home/bernardo/virtualenvs/likeaboss/lib/python2.7/site-packages/django/contrib/auth/tests/views.py"", line 144, in test_poisoned_http_host_admin_site
    self.assertEqual(len(mail.outbox), 0)
AssertionError: 1 != 0
}}}

These tests pass if I don't use the ADMINS configuration setting. To reproduce this test bug, you can just uncommnet this code line on your initial settings file inside the ADMINS setting:

{{{
ADMINS = (
   # ('Your Name', 'your_email@example.com'),
)
}}}"	Bug	closed	contrib.auth	1.4	Release blocker	fixed	unit tests, auth, admin, mail		Accepted	0	0	0	0	1	0
