(signal)
Catch django signal and return the mocked call.
Catch django signal and return the mocked call.
Catch django signal and return the mocked call .
def catch_signal(signal):
    """Catch django signal and return the mocked call."""
    from unittest.mock import Mock
    handler = Mock()
    signal.connect(handler)
    yield handler
    signal.disconnect(handler)
def catch_signal ( signal ) : from unittest . mock import Mock handler = Mock ( ) signal . connect ( handler ) yield handler signal . disconnect ( handler )