[Django] #25249: Exception signaling in test client disconnected by nested test client call.

3 views
Skip to first unread message

Django

unread,
Aug 7, 2015, 3:28:19 PM8/7/15
to django-...@googlegroups.com
#25249: Exception signaling in test client disconnected by nested test client call.
-------------------------+-------------------------------------------------
Reporter: | Owner: nobody
pscottdevos |
Type: Bug | Status: new
Component: Testing | Version: master
framework | Keywords: signals, test client,
Severity: Normal | got_request_exception
Triage Stage: | Has patch: 1
Unreviewed |
Easy pickings: 1 | UI/UX: 0
-------------------------+-------------------------------------------------
If the test client requests a view which itself makes a test client
request exceptions raised after the inner request are suppressed (i.e. the
traceback is not displayed). This happens because, when the inner test
client completes, it disconnects the got_request_exception signal.

The solution is to set a unique dispatch_uid in exactly the same manner as
it is done for the template_rendered signal.

--
Ticket URL: <https://code.djangoproject.com/ticket/25249>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 7, 2015, 3:33:23 PM8/7/15
to django-...@googlegroups.com
#25249: Exception signaling in test client disconnected by nested test client call.
-------------------------------------+-------------------------------------
Reporter: pscottdevos | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: signals, test | Triage Stage:
client, got_request_exception | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by pscottdevos):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

A pull request that fixes the problem and includes a unit test is
available at:

https://github.com/django/django/pull/5116

--
Ticket URL: <https://code.djangoproject.com/ticket/25249#comment:1>

Django

unread,
Aug 7, 2015, 5:54:22 PM8/7/15
to django-...@googlegroups.com
#25249: Exception signaling in test client disconnected by nested test client call.
-------------------------------------+-------------------------------------
Reporter: pscottdevos | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: signals, test | Triage Stage: Accepted
client, got_request_exception |

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/25249#comment:2>

Django

unread,
Aug 11, 2015, 9:55:40 AM8/11/15
to django-...@googlegroups.com
#25249: Exception signaling in test client disconnected by nested test client call.
-------------------------------------+-------------------------------------
Reporter: pscottdevos | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: signals, test | Triage Stage: Ready for
client, got_request_exception | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/25249#comment:3>

Django

unread,
Aug 11, 2015, 10:02:59 AM8/11/15
to django-...@googlegroups.com
#25249: Exception signaling in test client disconnected by nested test client call.
-------------------------------------+-------------------------------------
Reporter: pscottdevos | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed

Keywords: signals, test | Triage Stage: Ready for
client, got_request_exception | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => fixed


Comment:

In 7fa1dd8a80795d7573fe650014c5d23af7557bc7

Fixed #25249 -- Fixed exception handling in nested test client requests.

--
Ticket URL: <https://code.djangoproject.com/ticket/25249#comment:4>

Reply all
Reply to author
Forward
0 new messages