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())
评论列表
文章目录