'Ensures that the PROBLEM_WEIGHTED_SCORE_CHANGED signal enqueues the correct task.'

def test_triggered_by_problem_weighted_score_change(self):

    self.set_up_course()
    send_args = self.problem_weighted_score_changed_kwargs
    local_task_args = self.recalculate_subsection_grade_kwargs.copy()
    local_task_args['event_transaction_type'] = u'edx.grades.problem.submitted'
    with (self.mock_get_score() and patch('lms.djangoapps.grades.tasks.recalculate_subsection_grade_v3.apply_async', return_value=None)) as mock_task_apply:
        PROBLEM_WEIGHTED_SCORE_CHANGED.send(sender=None, **send_args)
        mock_task_apply.assert_called_once_with(countdown=RECALCULATE_GRADE_DELAY, kwargs=local_task_args)
