Feb 24, 2017 · 1 min read
Thank you for a very elegant solution.
I needed to add signal=charge_completed to get the assert working correctly.
handler.assert_called_once_with(total=100, sender=mock.ANY, signal=charge_completed)Also shouldn’t
with CatchSignal(signal) as handler:be
with CatchSignal(charge_completed) as handler:? — just for consistency.
And there are a few typos of no create concern. signal_kwrags should be signal_kwargs.
I really like all of your post — keep them coming please :)