'Tests to confirm the disconnect_submissions_signal_receiver context manager is working correctly.'

@ddt.data([score_set, 'lms.djangoapps.grades.signals.handlers.submissions_score_set_handler', SUBMISSION_SET_KWARGS], [score_reset, 'lms.djangoapps.grades.signals.handlers.submissions_score_reset_handler', SUBMISSION_RESET_KWARGS])
@ddt.unpack
def test_disconnect_manager(self, signal, handler, kwargs):

    handler_mock = self.setup_patch(handler, None)
    signal.send(None, **kwargs)
    handler_mock.assert_called_once()
    handler_mock.reset_mock()
    with disconnect_submissions_signal_receiver(signal):
        signal.send(None, **kwargs)
        handler_mock.assert_not_called()
        handler_mock.reset_mock()
    signal.send(None, **kwargs)
    handler_mock.assert_called_once()
