'Test that unenrolling and enrolling a student from a verified track
results in that student being in the default track'

def test_unenroll_and_enroll_verified(self):

    course_enrollment = CourseEnrollment.objects.get(user=self.enrolled_student, course_id=self.course.id)
    course_enrollment.mode = u'verified'
    course_enrollment.save()
    self.assertEqual(course_enrollment.mode, u'verified')
    self._change_student_enrollment(self.enrolled_student, self.course, 'unenroll')
    self._change_student_enrollment(self.enrolled_student, self.course, 'enroll')
    course_enrollment = CourseEnrollment.objects.get(user=self.enrolled_student, course_id=self.course.id)
    self.assertEqual(course_enrollment.mode, CourseMode.DEFAULT_MODE_SLUG)
