File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
django/contrib/auth/tests Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ def test_admin_reset(self):
115115 self .assertTrue ("http://adminsite.com" in mail .outbox [0 ].body )
116116 self .assertEqual (settings .DEFAULT_FROM_EMAIL , mail .outbox [0 ].from_email )
117117
118+ # Skip any 500 handler action (like sending more mail...)
119+ @override_settings (DEBUG_PROPAGATE_EXCEPTIONS = True )
118120 def test_poisoned_http_host (self ):
119121 "Poisoned HTTP_HOST headers can't be used for reset emails"
120122 # This attack is based on the way browsers handle URLs. The colon
@@ -131,6 +133,8 @@ def test_poisoned_http_host(self):
131133 )
132134 self .assertEqual (len (mail .outbox ), 0 )
133135
136+ # Skip any 500 handler action (like sending more mail...)
137+ @override_settings (DEBUG_PROPAGATE_EXCEPTIONS = True )
134138 def test_poisoned_http_host_admin_site (self ):
135139 "Poisoned HTTP_HOST headers can't be used for reset emails on admin views"
136140 with self .assertRaises (SuspiciousOperation ):
You can’t perform that action at this time.
0 commit comments