'Verify staff bypasses gated content and student gets list of unfulfilled prerequisites.'

def test_get_gated_content(self):

    staff = UserFactory(is_staff=True)
    student = UserFactory(is_staff=False)
    self.assertEqual(gating_api.get_gated_content(self.course, staff), [])
    self.assertEqual(gating_api.get_gated_content(self.course, student), [])
    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.get_course_content_milestones(self.course.id, self.seq2.location, 'requires')[0]
    self.assertEqual(gating_api.get_gated_content(self.course, staff), [])
    self.assertEqual(gating_api.get_gated_content(self.course, student), [unicode(self.seq2.location)])
    milestones_api.add_user_milestone({'id': student.id}, milestone)
    self.assertEqual(gating_api.get_gated_content(self.course, student), [])
