Did I find the right examples for you? yes no

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/m/i/Ming-0.4.7/ming/tests/test_session.py   Ming(Download)
        impl.remove.assert_called_with(dict(_id=None), safe=True)
 
        doc = self.TestDocNoSchema({'_id':5, 'a':5})
        sess.save(doc)
        impl.save.assert_called_with(dict(_id=5, a=5), safe=True)
        doc = self.TestDocNoSchema({'_id':5, 'a':5})
        sess.save(doc, 'a')
        impl.update.assert_called_with(dict(_id=5), {'$set':dict(a=5)}, safe=True)
        doc = self.TestDocNoSchema({'_id':5, 'a':5})
        sess.insert(doc)
        impl.insert.assert_called_with(dict(_id=5, a=5), safe=True)
        doc = self.TestDocNoSchema({'_id':5, 'a':5})
        sess.upsert(doc, ['a'])
        impl.update.assert_called_with(dict(a=5), dict(_id=5, a=5), upsert=True, safe=True)
                ])
 
        doc = self.TestDocNoSchema(dict(_id=1, a=5))
        sess.set(doc, dict(b=5))
        self.assertEqual(doc.b, 5)