'Test test_prerequisites'

def test_prerequisites(self):

    gating_api.add_prerequisite(self.course.id, self.seq1.location)
    prereqs = gating_api.get_prerequisites(self.course.id)
    self.assertEqual(len(prereqs), 1)
    self.assertEqual(prereqs[0]['block_display_name'], self.seq1.display_name)
    self.assertEqual(prereqs[0]['block_usage_key'], unicode(self.seq1.location))
    self.assertTrue(gating_api.is_prerequisite(self.course.id, self.seq1.location))
    gating_api.remove_prerequisite(self.seq1.location)
    self.assertEqual(len(gating_api.get_prerequisites(self.course.id)), 0)
    self.assertFalse(gating_api.is_prerequisite(self.course.id, self.seq1.location))
