A simple solution would be to add a context-manager assertion that can
check a signal was sent and received keyword arguments with certain names,
and then further inspection of the received arguments could be done inside
the `with` block. For example:
{{{
with self.AssertSignalSent(some_signal, required_kwargs=['my_kwarg']):
# ...do stuff...
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27447>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* version: 1.10 => master
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/27447#comment:1>
* status: new => assigned
* owner: nobody => James Bennett
--
Ticket URL: <https://code.djangoproject.com/ticket/27447#comment:2>
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
Comment:
WIP [https://github.com/django/django/pull/7508 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/27447#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/27447#comment:4>
* stage: Ready for checkin => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/27447#comment:5>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/27447#comment:6>
* needs_better_patch: 1 => 0
* stage: Ready for checkin => Accepted
Comment:
The code is looking good. Let's wait for a documentation review from a
native speaker.
--
Ticket URL: <https://code.djangoproject.com/ticket/27447#comment:7>
* stage: Accepted => Ready for checkin
Comment:
We're now at four other members of -core reviewed, all concerns addressed.
Speak now or implement fixes for your critique later.
--
Ticket URL: <https://code.djangoproject.com/ticket/27447#comment:8>
* needs_better_patch: 0 => 1
* stage: Ready for checkin => Accepted
Comment:
I left some comments on the PR. When James is finished with the updates,
I'll add a commit to the branch that makes use of this assertion in
Django's test suite.
--
Ticket URL: <https://code.djangoproject.com/ticket/27447#comment:9>
* owner: James Bennett => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/27447#comment:10>