Regarding arguments, since signal receivers must accept **kwargs (that’s a document requirement), I think it’s acceptable for assertSignalSent to ignore unexpected arguments.
"I don't think it would complicate the API too much to have a count=1 kwarg, and if count > 1 expect received_kwargs
to be a list of lists instead of just a list. This keeps the API
identical to what it is currently for the common case, but makes it
possible to make assertions about multiple signals. I think this is a
better API than a totally separate assertion (we're still asserting that
a signal was sent; what would the multiple version be named? assertSignalSentMultiple? Ugh.) This could be an enhancement in a separate PR, though.
Failing that, I think the assertion should pass if the signal was sent at least once with the named kwargs (if no kwargs named, then it should pass if sent at least once, period). The current behavior of just arbitrarily asserting against the kwargs of the most recent signal is not good, IMO."