'Set up the initial test data'

def setUp(self):

    super(TestGatedSubsectionRendering, self).setUp()
    self.chapter = ItemFactory.create(parent=self.course, category='chapter', display_name='Chapter')
    self.open_seq = ItemFactory.create(parent=self.chapter, category='sequential', display_name='Open    Sequential')
    self.gated_seq = ItemFactory.create(parent=self.chapter, category='sequential', display_name='Gated    Sequential')
    self.request = RequestFactory().get(('%s/%s/%s' % ('/courses', self.course.id, self.chapter.display_name)))
    self.request.user = UserFactory()
    self.field_data_cache = FieldDataCache.cache_for_descriptor_descendents(self.course.id, self.request.user, self.course, depth=2)
    gating_api.add_prerequisite(self.course.id, self.open_seq.location)
    gating_api.set_required_content(self.course.id, self.gated_seq.location, self.open_seq.location, 100)
