def test_len(self): feed = MockChangeFeed(['test'] * 5) self.assertEqual(5, len(list(feed.iter_changes(0)))) self.assertEqual(3, len(list(feed.iter_changes(2)))) self.assertEqual(0, len(list(feed.iter_changes(5)))) self.assertEqual(0, len(list(feed.iter_changes(10))))
def test_results(self): feed = MockChangeFeed(list(range(5))) changes = feed.iter_changes(0) for seq, change in enumerate(changes): self.assertEqual(seq, change)
def test_results(self): feed = MockChangeFeed(range(5)) changes = feed.iter_changes(0) for seq, change in enumerate(changes): self.assertEqual(seq, change)