

def test__map_reduce_son(self):
    result = self.db.things.map_reduce(self.map_func, self.reduce_func, out=SON([('replace', 'results'), ('db', 'map_reduce_son_test')]))
    self.assertTrue(isinstance(result, mongomock.Collection))
    result.assertEqual(result.name, 'results')
    self.assertEqual(result._database.name, 'map_reduce_son_test')
    self.assertEqual(result.count(), 3)
    for doc in result.find():
        self.assertIn(doc, self.expected_results)

dataset/ETHPy150Open vmalloc/mongomock/tests/test__mongomock.py CollectionMapReduceTest.test__map_reduce_son/VarMisuse@62/87 `self`->`result`