decoder.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:mongoengine_utils 作者: aiscenblue 项目源码 文件源码
def setUp(self):
        """Setup test."""
        from datetime import datetime

        class DateTime(db.Document):
            date = db.DateTimeField()

        self.model_cls = DateTime
        now = datetime.utcnow()

        # This format shouldn't be supported.
        self.data = json.dumps({"date": {
            "year": now.year,
            "month": now.month,
            "date": now.day
        }})
        self.hook = generate_object_hook(self.model_cls)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号