def test_noNext(self): """ Test that None is returned when there is no next item in the list """ expected = None item = 2 l = KaoList([1, item]) self.assertEqual(expected, l.next(item))
def test_hasNext(self): """ Test that the next element is returned when it exists """ expected = 1 item = 2 l = KaoList([item, expected]) self.assertEqual(expected, l.next(item))