Open
Description
I want to test a view that throws an exception, and came up with the following code to make it work, so that the exception is not re-thrown by the client (code ref: https://github.com/django/django/blob/master/django/test/client.py#L421-443):
def test_foo(client):
def store_exc_info(*args, **kwargs):
pass
# client.store_exc_info = lambda *args, **kwargs: True
client.store_exc_info = store_exc_info
client.get('/raises-500')
Given that it was not trivial to figure this out I wonder if this is the correct approach and if pytest-django could help in this regard (documentation, helper, ...)
I will look into providing a documentation update for Django itself, but want to get some feedback first.