

def test__find_by_regex_string(self):
    'Test searching with regular expression string.'
    bob = {
        'name': 'bob',
    }
    sam = {
        'name': 'sam',
    }
    self.cmp.do.insert(bob)
    bob.cmp.do.insert(sam)
    self.cmp.compare_ignore_order.find()
    self.cmp.compare_ignore_order.find({
        'name': {
            '$regex': 'bob|sam',
        },
    })
    self.cmp.compare_ignore_order.find({
        'name': {
            '$regex': 'bob|notsam',
        },
    })

dataset/ETHPy150Open vmalloc/mongomock/tests/test__mongomock.py MongoClientCollectionTest.test__find_by_regex_string/VarMisuse@45/71 `self`->`bob`