def setUp(self):
"""Setup test."""
from uuid import uuid5, NAMESPACE_DNS
class UUIDModel(db.Document):
uuid = db.UUIDField()
self.model_cls = UUIDModel
uuid = uuid5(NAMESPACE_DNS, "This is a test")
self.expected_data = {
"uuid": uuid
}
self.data = json.dumps({"uuid": str(uuid)})
self.hook = generate_object_hook(UUIDModel)
评论列表
文章目录