

def test__find_notequal(self):
    'Test searching with operators other than equality.'
    bob = {
        '_id': 1,
        'name': 'bob',
    }
    sam = {
        '_id': 2,
        'name': 'sam',
    }
    a_goat = {
        '_id': 3,
        'goatness': 'very',
    }
    self.cmp.do.insert([bob, sam, a_goat])
    self.cmp.compare_ignore_order.find()
    self.cmp.compare_ignore_order.find({
        'name': {
            '$ne': 'bob',
        },
    })
    self.cmp.compare_ignore_order.find({
        'goatness': {
            '$ne': 'very',
        },
    })
    self.cmp.compare_ignore_order.find({
        'goatness': {
            '$ne': 'not very',
        },
    })
    self.cmp.compare_ignore_order.find({
        'snakeness': {
            '$ne': 'very',
        },
    })

dataset/ETHPy150Open vmalloc/mongomock/tests/test__mongomock.py MongoClientCollectionTest.test__find_notequal/original