google-app-engine - 单元测试 Google 的 Cloud Storage API

标签 google-app-engine google-cloud-platform google-cloud-storage

我有一个 API 端点,我正在尝试为其编写单元测试,但我似乎无法弄清楚如何对 Python Google Cloud Storage 客户端库调用 (https://cloud.google.com/appengine/docs/python/googlecloudstorageclient/) 进行单元测试。 我希望在库中的某个地方找到一个 stub ,让它像对邮件 API 进行单元测试一样简单 (https://cloud.google.com/appengine/docs/python/tools/localunittesting?hl=en),但还没有找到任何东西。知道如何解决这个问题吗?

最佳答案

list of available unit test does not list GCS .您可以在 their GitHub 上提交功能请求添加该功能。

与此同时,使用测试设置来创建文件可能是您最好的选择。

关于google-app-engine - 单元测试 Google 的 Cloud Storage API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32613897/

相关文章:

google-app-engine - 在我的 Google App Engine 应用程序达到免费配额限制(禁用计费)后会发生什么?

google-cloud-platform - 通过请求 URL 调整 Google Cloud 图像的大小?

networking - 谷歌云 - 阻止传入连接

java - Google Cloud Bigtable 客户端连接池

firebase - 错误 : storage/object-not-found when trying to upload large image file

python - 为什么 GQL 查询不匹配?

python - App Engine session 超时

python - Google App Engine deferred.defer() 错误 404

php - 没有缓存的谷歌云存储公共(public)访问

javascript - 将图片从 Google Cloud Function 上传到 Cloud Storage