

def test__inline_map_reduce_full_response(self):
    expected_full_response = {
        'counts': {
            'input': 4,
            'reduce': 2,
            'emit': 6,
            'output': 3,
        },
        'timeMillis': 5,
        'ok': 1.0,
        'result': [{
            '_id': 'cat',
            'value': 3,
        }, {
            '_id': 'dog',
            'value': 2,
        }, {
            '_id': 'mouse',
            'value': 1,
        }],
    }
    result = self.db.things.inline_map_reduce(self.map_func, self.reduce_func, full_response=True)
    self.assertTrue(isinstance(result, dict))
    self.assertEqual(result['counts'], expected_full_response['counts'])
    for doc in result['result']:
        self.assertIn(doc, self.expected_results)

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