Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed tests that relied on MANAGERS not being empty.

Regression in d056124.
  • Loading branch information...
commit f8a634afa2b5810a7bfc17868ca216d277f0f24b 1 parent 94521f5
Aymeric Augustin authored

Showing 1 changed file with 10 additions and 4 deletions. Show diff stats Hide diff stats

  1. 14  tests/middleware/tests.py
14  tests/middleware/tests.py
@@ -245,7 +245,8 @@ def test_prepend_www_append_slash_slashless_custom_urlconf(self):
245 245
     # Legacy tests for the 404 error reporting via email (to be removed in 1.8)
246 246
 
247 247
     @override_settings(IGNORABLE_404_URLS=(re.compile(r'foo'),),
248  
-                       SEND_BROKEN_LINK_EMAILS=True)
  248
+                       SEND_BROKEN_LINK_EMAILS=True,
  249
+                       MANAGERS=('PHB@dilbert.com',))
249 250
     def test_404_error_reporting(self):
250 251
         request = self._get_request('regular_url/that/does/not/exist')
251 252
         request.META['HTTP_REFERER'] = '/another/url/'
@@ -257,7 +258,8 @@ def test_404_error_reporting(self):
257 258
         self.assertIn('Broken', mail.outbox[0].subject)
258 259
 
259 260
     @override_settings(IGNORABLE_404_URLS=(re.compile(r'foo'),),
260  
-                       SEND_BROKEN_LINK_EMAILS=True)
  261
+                       SEND_BROKEN_LINK_EMAILS=True,
  262
+                       MANAGERS=('PHB@dilbert.com',))
261 263
     def test_404_error_reporting_no_referer(self):
262 264
         request = self._get_request('regular_url/that/does/not/exist')
263 265
         with warnings.catch_warnings():
@@ -267,7 +269,8 @@ def test_404_error_reporting_no_referer(self):
267 269
         self.assertEqual(len(mail.outbox), 0)
268 270
 
269 271
     @override_settings(IGNORABLE_404_URLS=(re.compile(r'foo'),),
270  
-                       SEND_BROKEN_LINK_EMAILS=True)
  272
+                       SEND_BROKEN_LINK_EMAILS=True,
  273
+                       MANAGERS=('PHB@dilbert.com',))
271 274
     def test_404_error_reporting_ignored_url(self):
272 275
         request = self._get_request('foo_url/that/does/not/exist/either')
273 276
         request.META['HTTP_REFERER'] = '/another/url/'
@@ -287,7 +290,10 @@ def test_non_ascii_query_string_does_not_crash(self):
287 290
         self.assertEqual(response.status_code, 301)
288 291
 
289 292
 
290  
-@override_settings(IGNORABLE_404_URLS=(re.compile(r'foo'),))
  293
+@override_settings(
  294
+    IGNORABLE_404_URLS=(re.compile(r'foo'),),
  295
+    MANAGERS=('PHB@dilbert.com',),
  296
+)
291 297
 class BrokenLinkEmailsMiddlewareTest(TestCase):
292 298
 
293 299
     def setUp(self):

0 notes on commit f8a634a

Please sign in to comment.
Something went wrong with that request. Please try again.