'Test that a Django signal is generated when a score changes'

@patch('lms.djangoapps.grades.signals.handlers.PROBLEM_RAW_SCORE_CHANGED.send')
def test_score_change_signal(self, send_mock):

    with freeze_time(datetime.now().replace(tzinfo=pytz.UTC)):
        self.set_module_grade_using_publish(self.grade_dict)
        expected_signal_kwargs = {'sender': None, 'raw_possible': self.grade_dict['max_value'], 'raw_earned': self.grade_dict['value'], 'weight': None, 'user_id': self.student_user.id, 'course_id': unicode(self.course.id), 'usage_id': unicode(self.problem.location), 'only_if_higher': None, 'modified': datetime.now().replace(tzinfo=pytz.UTC), 'score_db_table': 'csm'}
        send_mock.assert_called_with(**expected_signal_kwargs)
