

def test__find_by_attributes_return_fields(self):
    id1 = ObjectId()
    id2 = ObjectId()
    self.cmp.do.insert({
        '_id': id1,
        'name': 'new',
        'someOtherProp': 2,
    })
    self.cmp.do.insert({
        '_id': id2,
        'name': 'another new',
    })
    self.cmp.compare_ignore_order.find({
        
    }, {
        '_id': 0,
    })
    self.cmp.compare_ignore_order.find({
        
    }, {
        '_id': 1,
        'someOtherProp': 1,
    })
    self.cmp.compare_ignore_order.find({
        
    }, {
        '_id': 0,
        'someOtherProp': 0,
    })
    self.cmp.compare_ignore_order.find({
        
    }, {
        '_id': 0,
        'someOtherProp': 1,
    })
    self.cmp.compare_ignore_order.find({
        
    }, {
        'someOtherProp': 0,
    })
    self.cmp.compare_ignore_order.find({
        
    }, {
        'someOtherProp': 1,
    })
    self.cmp.compare.find({
        '_id': id1,
    }, {
        '_id': 0,
    })
    self.cmp.compare.find({
        '_id': id2,
    }, {
        '_id': 1,
        'someOtherProp': 1,
    })
    self.cmp.compare.find({
        '_id': id1,
    }, {
        '_id': 0,
        'someOtherProp': 0,
    })
    self.cmp.compare.find({
        '_id': id1,
    }, {
        '_id': 0,
        'someOtherProp': 1,
    })
    self.cmp.compare.find({
        '_id': id1,
    }, {
        'someOtherProp': 0,
    })
    self.cmp.compare.find({
        '_id': id1,
    }, {
        'someOtherProp': 1,
    })

dataset/ETHPy150Open vmalloc/mongomock/tests/test__mongomock.py MongoClientCollectionTest.test__find_by_attributes_return_fields/VarMisuse@265/337 `id1`->`id2`