'"Dry method for course enrollment.'

def _enrollment_with_complete_course(self, enrollment_mode):

    CourseModeFactory.create(course_id=self.course.id, mode_slug='verified', mode_display_name='Verified', expiration_datetime=(datetime.now(pytz.UTC) + timedelta(days=1)))
    enrollment = CourseEnrollment.enroll(self.user, self.course.id, mode=enrollment_mode)
    return complete_course_mode_info(self.course.id, enrollment)
