'Verify that an enrollment in an expired mode can be deactivated.'

def test_deactivate_enrollment_expired_mode(self):

    for mode in (CourseMode.HONOR, CourseMode.VERIFIED):
        CourseModeFactory.create(course_id=self.course.id, mode_slug=mode, mode_display_name=mode)
    self.assert_enrollment_status(as_server=True, mode=CourseMode.VERIFIED)
    mode = CourseMode.objects.get(course_id=self.course.id, mode_slug=CourseMode.VERIFIED)
    mode.expiration_datetime = datetime.datetime(year=1970, month=1, day=1, tzinfo=pytz.utc)
    mode.save()
    self.assert_enrollment_activation(False, CourseMode.VERIFIED)
