@defer.inlineCallbacks
    def test_SimpleUpdate(self):
        yield self.coll.insert([{'x': 42}, {'x': 123}])

        yield self.coll.update({}, {"$set": {'x': 456}})

        docs = yield self.coll.find(fields={"_id": 0})

        # Check that only one document was updated
        self.assertTrue({'x': 456} in docs)
        self.assertTrue(({'x': 42} in docs) or ({'x': 123} in docs))
dataset/ETHPy150Open twisted/txmongo/tests/test_queries.py/TestUpdate.test_SimpleUpdate/original