Fixed some flake8 warnings
This commit is contained in:
parent
e4b012feeb
commit
c348550d35
|
@ -282,17 +282,17 @@ class PlainTextReportTests(TestCase):
|
||||||
"An exception report can be generated for just a request"
|
"An exception report can be generated for just a request"
|
||||||
request = self.rf.get('/test_view/')
|
request = self.rf.get('/test_view/')
|
||||||
reporter = ExceptionReporter(request, None, None, None)
|
reporter = ExceptionReporter(request, None, None, None)
|
||||||
text = reporter.get_traceback_text()
|
reporter.get_traceback_text()
|
||||||
|
|
||||||
def test_request_and_message(self):
|
def test_request_and_message(self):
|
||||||
"A message can be provided in addition to a request"
|
"A message can be provided in addition to a request"
|
||||||
request = self.rf.get('/test_view/')
|
request = self.rf.get('/test_view/')
|
||||||
reporter = ExceptionReporter(request, None, "I'm a little teapot", None)
|
reporter = ExceptionReporter(request, None, "I'm a little teapot", None)
|
||||||
text = reporter.get_traceback_text()
|
reporter.get_traceback_text()
|
||||||
|
|
||||||
def test_message_only(self):
|
def test_message_only(self):
|
||||||
reporter = ExceptionReporter(None, None, "I'm a little teapot", None)
|
reporter = ExceptionReporter(None, None, "I'm a little teapot", None)
|
||||||
text = reporter.get_traceback_text()
|
reporter.get_traceback_text()
|
||||||
|
|
||||||
|
|
||||||
class ExceptionReportTestMixin(object):
|
class ExceptionReportTestMixin(object):
|
||||||
|
@ -376,7 +376,7 @@ class ExceptionReportTestMixin(object):
|
||||||
with self.settings(ADMINS=(('Admin', 'admin@fattie-breakie.com'),)):
|
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)
|
request = self.rf.post('/some_url/', self.breakfast_data)
|
||||||
response = view(request)
|
view(request)
|
||||||
self.assertEqual(len(mail.outbox), 1)
|
self.assertEqual(len(mail.outbox), 1)
|
||||||
email = mail.outbox[0]
|
email = mail.outbox[0]
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ class ExceptionReportTestMixin(object):
|
||||||
with self.settings(ADMINS=(('Admin', 'admin@fattie-breakie.com'),)):
|
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)
|
request = self.rf.post('/some_url/', self.breakfast_data)
|
||||||
response = view(request)
|
view(request)
|
||||||
self.assertEqual(len(mail.outbox), 1)
|
self.assertEqual(len(mail.outbox), 1)
|
||||||
email = mail.outbox[0]
|
email = mail.outbox[0]
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ class ExceptionReportTestMixin(object):
|
||||||
with self.settings(ADMINS=(('Admin', 'admin@fattie-breakie.com'),)):
|
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)
|
request = self.rf.post('/some_url/', self.breakfast_data)
|
||||||
response = view(request)
|
view(request)
|
||||||
self.assertEqual(len(mail.outbox), 1)
|
self.assertEqual(len(mail.outbox), 1)
|
||||||
email = mail.outbox[0]
|
email = mail.outbox[0]
|
||||||
# Frames vars are never shown in plain text email reports.
|
# Frames vars are never shown in plain text email reports.
|
||||||
|
|
Loading…
Reference in New Issue