'Unit Test: test_entrance_exam_gating'

def test_entrance_exam_gating(self):

    chaos_user = UserFactory()
    locked_toc = self._return_table_of_contents()
    for toc_section in self.expected_locked_toc:
        self.assertIn(toc_section, locked_toc)
    answer_entrance_exam_problem(self.course, self.request, self.problem_1, chaos_user)
    answer_entrance_exam_problem(self.course, self.request, self.problem_1)
    answer_entrance_exam_problem(self.course, self.request, self.problem_2)
    unlocked_toc = self._return_table_of_contents()
    for toc_section in self.expected_unlocked_toc:
        self.assertIn(toc_section, unlocked_toc)
