test_storage.py 文件源码

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

项目:django-gstorage 作者: fyndiq 项目源码 文件源码
def test_save_with_location(self, mock_blob, mock_bucket):
        s = Storage(location='images')
        content = InMemoryUploadedFile(six.StringIO('1'), '', 'test.jpg', 'text/plain', 1, 'utf8')
        with content:
            s._save('', content)
        mock_blob.assert_called_once_with('images/test.jpg', mock_bucket())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号