summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnubhav Joshi <anubhav9042@gmail.com>2014-06-24 09:43:34 +0530
committerTim Graham <timograham@gmail.com>2014-06-24 08:55:36 -0400
commitdbbcfca476e29354c3a5c6221112b55741babc14 (patch)
tree082c8c716f28a8ac41d50ec89c3d76da12bf964b /tests
parent150d88cc2c0866ef65f077387e3e560e9c9c3f80 (diff)
Fixed #21668 -- Return detailed error page when SuspiciousOperation is raised and DEBUG=True
Thanks GDorn and gox21 for report. Thanks Tim Graham for idea and review.
Diffstat (limited to 'tests')
-rw-r--r--tests/view_tests/tests/test_debug.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py
index 55a8ded31b..32a8304dca 100644
--- a/tests/view_tests/tests/test_debug.py
+++ b/tests/view_tests/tests/test_debug.py
@@ -44,6 +44,11 @@ class DebugViewTests(TestCase):
self.assertContains(response, 'file_data.txt', status_code=500)
self.assertNotContains(response, 'haha', status_code=500)
+ def test_400(self):
+ # Ensure that when DEBUG=True, technical_500_template() is called.
+ response = self.client.get('/raises400/')
+ self.assertContains(response, '<div class="context" id="', status_code=400)
+
def test_403(self):
# Ensure no 403.html template exists to test the default case.
with override_with_test_loader({}):