'Happy path testing to see that when a course is published which contains
a proctored exam, it will also put an entry into the exam tables'

@ddt.data((True, 10, True, False, True, False, False), (True, 10, False, False, True, False, False), (True, 10, False, False, True, False, True), (True, 10, True, True, True, True, False))
@ddt.unpack
def test_publishing_exam(self, is_time_limited, default_time_limit_minutes, is_proctored_exam, is_practice_exam, expected_active, republish, hide_after_due):

    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=is_time_limited, default_time_limit_minutes=default_time_limit_minutes, is_proctored_exam=is_proctored_exam, is_practice_exam=is_practice_exam, due=(datetime.now(UTC) + timedelta(minutes=(default_time_limit_minutes + 1))), exam_review_rules='allow_use_of_paper', hide_after_due=hide_after_due)
    listen_for_course_publish(self, self.course.id)
    self._verify_exam_data(sequence, expected_active)
    if republish:
        sequence.default_time_limit_minutes += sequence.default_time_limit_minutes
        self.store.update_item(sequence, self.user.id)
        listen_for_course_publish(self, self.course.id)
        self._verify_exam_data(sequence, expected_active)
