'Set the course-end date and expire its verified mode.'

def set_course_end_date_and_expiry(self):

    self.course.start = datetime(year=1970, month=1, day=1, tzinfo=UTC)
    self.course.end = datetime(year=1970, month=1, day=10, tzinfo=UTC)
    verified_mode = CourseMode.objects.get(course_id=self.course.id, mode_slug=CourseMode.VERIFIED)
    verified_mode.expiration_datetime = datetime(year=1970, month=1, day=9, tzinfo=UTC)
    verified_mode.save()
