小编Jai*_*uez的帖子

如何对Google Cloud Endpoints进行单元测试

我需要一些帮助来设置Google Cloud Endpoints的单元测试.使用WebTest所有请求都回答AppError:错误响应:404 Not Found.我不确定端点是否与WebTest兼容.

这是应用程序的生成方式:

application = endpoints.api_server([TestEndpoint], restricted=False)
Run Code Online (Sandbox Code Playgroud)

然后我用这种方式使用WebTest:

client = webtest.TestApp(application)
client.post('/_ah/api/test/v1/test', params)
Run Code Online (Sandbox Code Playgroud)

使用curl进行测试工作正常.

我应该为端点编写不同的测试吗?GAE Endpoints团队的建议是什么?

python google-app-engine unit-testing google-cloud-endpoints

38
推荐指数
2
解决办法
5894
查看次数