'Ensure that on receipt of a score_(re)set signal from the Submissions API,
the signal handler correctly converts it to a PROBLEM_WEIGHTED_SCORE_CHANGED
signal.
Also ensures that the handler calls user_by_anonymous_id correctly.'

@ddt.data([submissions_score_set_handler, SUBMISSION_SET_KWARGS, 5, 10], [submissions_score_reset_handler, SUBMISSION_RESET_KWARGS, 0, 0])
@ddt.unpack
def test_score_set_signal_handler(self, handler, kwargs, earned, possible):

    handler(None, **kwargs)
    expected_set_kwargs = {'sender': None, 'weighted_possible': possible, 'weighted_earned': earned, 'user_id': self.user_mock.id, 'anonymous_user_id': 'anonymous_id', 'course_id': 'CourseID', 'usage_id': 'i4x://org/course/usage/123456', 'modified': FROZEN_NOW_TIMESTAMP, 'score_db_table': 'submissions'}
    if (handler == submissions_score_reset_handler):
        expected_set_kwargs['score_deleted'] = True
    self.signal_mock.assert_called_once_with(**expected_set_kwargs)
    self.get_user_mock.assert_called_once_with(kwargs['anonymous_user_id'])
