def testRestrictRankedList(self): ranker = GraphRanker() list1 = [4, 2, 1,7,3, 8, 9, 12] list2 = [8, 9, 2] outputList = ranker.restrictRankedList(list1, list2) self.assertEquals(outputList, [2, 8, 9]) outputList = ranker.restrictRankedList(list1, [3, 1, 12]) self.assertEquals(outputList, [1, 3, 12])