﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3162	Test client should re-raise exceptions created while rendering a page	afternoon@…	Russell Keith-Magee	"With the current {{{django.test.client.Client}}} class it is not possible to inspect an exception created by the code being tested.

For example, a view may raise an exception due to syntax error, malformed input from the test case or for any number of reasons. The exception is handled by Django and a standard error view (either a 500 page or error debug page) is returned with no other indication about the original exception. It is therefore difficult to track down the actual cause of the error.

A simple patch can handle the {{{got_request_exception}}} signal created by the base handler and capture the actual exception object and it's associated {{{exc_info}}}. The exception can then be reraised, complete with the original frame/location information, after the handler has finished. The exception can then be inspected by the test case. The standard behaviour of the test case is to print a stack trace to stdout, which is very useful when creating or fixing tests. As the exception location information is not modified, the original cause can be found and fixed."	enhancement	closed	Testing framework	dev	normal	fixed			Ready for checkin	1	0	0	0	0	0
