'Creates a InstructorTask entry for testing.'

def _create_input_entry(self, student_ident=None, use_problem_url=True, course_id=None, only_if_higher=False, score=None):

    task_id = str(uuid4())
    task_input = {'only_if_higher': only_if_higher}
    if use_problem_url:
        task_input['problem_url'] = self.location
    if (student_ident is not None):
        task_input['student'] = student_ident
    if (score is not None):
        task_input['score'] = score
    course_id = (course_id or self.course.id)
    instructor_task = InstructorTaskFactory.create(course_id=course_id, requester=self.instructor, task_input=json.dumps(task_input, cls=i4xEncoder), task_key='dummy    value', task_id=task_id)
    return instructor_task
