

def test__map_reduce_with_limit(self):
    result = self.db.things.map_reduce(self.map_func, self.reduce_func, 'myresults', limit=2)
    self.assertTrue(isinstance(result, mongomock.Collection))
    self.assertEqual(result.name, 'myresults')
    self.assertEqual(result.count(), 2)

dataset/ETHPy150Open vmalloc/mongomock/tests/test__mongomock.py CollectionMapReduceTest.test__map_reduce_with_limit/original