'Enroll the test user in the given course\'s mode. Use course/mode if they are
provided.'

def enroll(self, course_id=None, mode=CourseMode.VERIFIED):

    if (course_id is None):
        course_id = self.course.id
    return CourseEnrollment.enroll(self.user, course_id, mode=mode)
