'Make sure that if we publish and then unpublish a proctored exam,
the exam record stays, but is marked as is_active=False'

def test_unpublishing_proctored_exam(self):

    chapter = ItemFactory.create(parent=self.course, category='chapter', display_name='Test    Section')
    sequence = ItemFactory.create(parent=chapter, category='sequential', display_name='Test    Proctored    Exam', graded=True, is_time_limited=True, default_time_limit_minutes=10, is_proctored_exam=True, hide_after_due=False)
    listen_for_course_publish(self, self.course.id)
    exams = get_all_exams_for_course(unicode(self.course.id))
    self.assertEqual(len(exams), 1)
    sequence.is_time_limited = False
    sequence.is_proctored_exam = False
    self.store.update_item(sequence, self.user.id)
    listen_for_course_publish(self, self.course.id)
    self._verify_exam_data(sequence, False)
