tangentlabs/django-oscar-testsupport — pull request #1 by a-musing-moose (2013-03-05 05:20:35+00:00)
Title: Add context manager to enable mocking of signal handlers

Provides the ability to mock signal receivers to allow testing of signal dispatch.

e.g.:

with mock_signal_receiver(signal) as receiver:
# Do the thing that should trigger the signal
self.assertEquals(receiver.call_count, 1)