def insert(self, doc, synced=False):
        doc.id = self.get_next_id()
        doc.synced = synced
        try:
            self.db.docs.insert(doc)
        except Exception as e:
            raise DatabaseException(e)
        return doc
def test_keyword_initializers(self):
        class POINT(Structure):
            _fields_ = [("x", c_int), ("y", c_int)]
        pt = POINT(1, 2)
        self.assertEqual((pt.x, pt.y), (1, 2))

        pt = POINT(y=2, x=1)
        self.assertEqual((pt.x, pt.y), (1, 2))