test_models.py 文件源码

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

项目:SpongeAuth 作者: lukegb 项目源码 文件源码
def _generate_image():
    from PIL import Image
    thumb = Image.new('RGB', (100, 100), 'blue')
    thumb_io = io.BytesIO()
    thumb.save(thumb_io, format='PNG')
    thumb_io.seek(0, io.SEEK_SET)
    return SimpleUploadedFile("image.png", thumb_io.getbuffer(), content_type="image/png")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号