1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixing E302 Errors

Signed-off-by: Jason Myers <jason@jasonamyers.com>
This commit is contained in:
Jason Myers
2013-11-02 16:34:05 -05:00
parent 2a03a9a9a1
commit c3791463a5
98 changed files with 748 additions and 96 deletions

View File

@@ -185,7 +185,7 @@ class ExceptionReporterTests(TestCase):
for newline in ['\n', '\r\n', '\r']:
fd, filename = mkstemp(text=False)
os.write(fd, force_bytes(newline.join(LINES)+newline))
os.write(fd, force_bytes(newline.join(LINES) + newline))
os.close(fd)
try:
@@ -375,7 +375,7 @@ class ExceptionReportTestMixin(object):
Asserts that potentially sensitive info are displayed in the email report.
"""
with self.settings(ADMINS=(('Admin', 'admin@fattie-breakie.com'),)):
mail.outbox = [] # Empty outbox
mail.outbox = [] # Empty outbox
request = self.rf.post('/some_url/', self.breakfast_data)
view(request)
self.assertEqual(len(mail.outbox), 1)
@@ -408,7 +408,7 @@ class ExceptionReportTestMixin(object):
Asserts that certain sensitive info are not displayed in the email report.
"""
with self.settings(ADMINS=(('Admin', 'admin@fattie-breakie.com'),)):
mail.outbox = [] # Empty outbox
mail.outbox = [] # Empty outbox
request = self.rf.post('/some_url/', self.breakfast_data)
view(request)
self.assertEqual(len(mail.outbox), 1)
@@ -448,7 +448,7 @@ class ExceptionReportTestMixin(object):
Asserts that no variables or POST parameters are displayed in the email report.
"""
with self.settings(ADMINS=(('Admin', 'admin@fattie-breakie.com'),)):
mail.outbox = [] # Empty outbox
mail.outbox = [] # Empty outbox
request = self.rf.post('/some_url/', self.breakfast_data)
view(request)
self.assertEqual(len(mail.outbox), 1)
@@ -641,6 +641,7 @@ class ExceptionReporterFilterTests(TestCase, ExceptionReportTestMixin):
response = self.client.get('/views/raises500/')
self.assertNotContains(response, 'should not be displayed', status_code=500)
class AjaxResponseExceptionReporterFilter(TestCase, ExceptionReportTestMixin):
"""
Ensure that sensitive information can be filtered out of error reports.