'Create a course mode and enrollment.
Arguments:
deadline (datetime): The deadline for submitting your verification.
enrollment_mode (str): The mode of the enrollment.'

def _setup_mode_and_enrollment(self, deadline, enrollment_mode):

    CourseModeFactory.create(course_id=self.course.id, mode_slug='verified', expiration_datetime=deadline)
    CourseEnrollmentFactory(course_id=self.course.id, user=self.user, mode=enrollment_mode)
    VerificationDeadline.set_deadline(self.course.id, deadline)
