'Test test_find_gating_milestones'

def test_find_gating_milestones(self):

    gating_api.add_prerequisite(self.course.id, self.seq1.location)
    gating_api.set_required_content(self.course.id, self.seq2.location, self.seq1.location, 100)
    milestone = milestones_api.add_milestone(self.generic_milestone)
    milestones_api.add_course_content_milestone(self.course.id, self.seq1.location, 'fulfills', milestone)
    self.assertEqual(len(gating_api.find_gating_milestones(self.course.id, self.seq1.location, 'fulfills')), 1)
    self.assertEqual(len(gating_api.find_gating_milestones(self.course.id, self.seq1.location, 'requires')), 0)
    self.assertEqual(len(gating_api.find_gating_milestones(self.course.id, self.seq2.location, 'fulfills')), 0)
    self.assertEqual(len(gating_api.find_gating_milestones(self.course.id, self.seq2.location, 'requires')), 1)
