'Test generation of TOC for a course with a gated subsection'

def test_toc_with_gated_sequential(self):

    actual = render.toc_for_course(self.request.user, self.request, self.course, self.chapter.display_name, self.open_seq.display_name, self.field_data_cache)
    self.assertIsNotNone(self._find_sequential(actual['chapters'], 'Chapter', 'Open_Sequential'))
    self.assertIsNone(self._find_sequential(actual['chapters'], 'Chapter', 'Gated_Sequential'))
    self.assertIsNone(self._find_sequential(actual['chapters'], 'Non-existent_Chapter', 'Non-existent_Sequential'))
    self.assertIsNone(actual['previous_of_active_section'])
    self.assertIsNone(actual['next_of_active_section'])
