﻿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
27893	Make it possible to disable exception re-raising in test client	Carl Meyer	nobody	"In the Django test client, we connect to the `got_request_exception` signal, store any signalled exception on the test client, and then after the response is returned, we check for a signalled exception and re-raise it (https://github.com/django/django/blob/master/django/test/client.py#L492-L495). Fair enough; usually in tests you prefer to have the exception raised instead of just seeing a 500 error.

But there are two problems with this: 1) it's impossible to turn off (and sometimes there are times when you'd want to, e.g. if testing behavior of `handle_uncaught_exception` in a custom WSGI handler subclass), and 2) Django has long had an alternate method to do exactly the same thing, the `DEBUG_PROPAGATE_EXCEPTIONS` setting.

The setting is much simpler, and it's easy to turn off for a selected test.

I think we should at least provide a way to turn off the test client re-raising behavior (perhaps via a flag set on the client).

I'm tempted to suggest we should also at some point raise a deprecation warning if this flag is not set, suggesting to use DEBUG_PROPAGATE_EXCEPTIONS when running tests instead, and then later remove the test-client re-raising altogether. But removing this bit of code may not be worth the churn of that deprecation."	New feature	closed	Testing framework	1.10	Normal	duplicate			Unreviewed	0	0	0	0	0	0
