diff options
author | nik258heda <heda258nikunj@gmail.com> | 2020-10-09 17:45:09 +0530 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-10-12 06:29:36 +0200 |
commit | 079deba53038054361eb32afdd06ce9df1040bc7 (patch) | |
tree | e763f5e578875a94bcb0f162ab8d54348569340e /tests/view_tests | |
parent | f1f24539d8c86f60d1e2951a19eb3178e15d6399 (diff) | |
download | django-079deba53038054361eb32afdd06ce9df1040bc7.tar.gz |
Fixed #32087 -- Made technical 500 debug page use HTTPS for sharing traceback.
Diffstat (limited to 'tests/view_tests')
-rw-r--r-- | tests/view_tests/tests/test_debug.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py index 1ce4f3f800..3cbeb2e03a 100644 --- a/tests/view_tests/tests/test_debug.py +++ b/tests/view_tests/tests/test_debug.py @@ -401,6 +401,19 @@ class ExceptionReporterTests(SimpleTestCase): self.assertIn('<h2>Request information</h2>', html) self.assertIn('<p>Request data not supplied</p>', html) + def test_sharing_traceback(self): + try: + raise ValueError('Oops') + except ValueError: + exc_type, exc_value, tb = sys.exc_info() + reporter = ExceptionReporter(None, exc_type, exc_value, tb) + html = reporter.get_traceback_html() + self.assertIn( + '<form action="https://dpaste.com/" name="pasteform" ' + 'id="pasteform" method="post">', + html, + ) + def test_eol_support(self): """The ExceptionReporter supports Unix, Windows and Macintosh EOL markers""" LINES = ['print %d' % i for i in range(1, 6)] |