'Creates a user and enrolls them in the test course.'

def _create_user(self, username, email=None, is_staff=False, mode='honor', enrollment_active=True):

    if (email is None):
        email = InstructorTaskCourseTestCase.get_user_email(username)
    thisuser = UserFactory.create(username=username, email=email, is_staff=is_staff)
    CourseEnrollmentFactory.create(user=thisuser, course_id=self.course.id, mode=mode, is_active=enrollment_active)
    return thisuser
