def test_filter(self):
    c = Collection([{'id': 1, 'name': 'hello'}, {'id': 2, 'name': 'world'}])
    self.assertEqual([{'id': 2, 'name': 'world'}], c.filter((lambda item: (item['id'] == 2))).all())
    c = Collection(['', 'hello', '', 'world'])
    self.assertEqual(['hello', 'world'], c.filter().all())
def test_filter(self):
    c = Collection([{'id': 1, 'name': 'hello'}, {'id': 2, 'name': 'world'}])
    self.assertEqual([{'id': 2, 'name': 'world'}], c.filter((lambda item: (item['id'] == 2))).all())
    c = Collection([, 'hello', , 'world'])
    self.assertEqual(['hello', 'world'], c.filter().all())