简体   繁体   English

您如何对 Google Cloud NDB 代码进行单元测试?

[英]How do you unit test Google Cloud NDB code?

The recommended path for upgrading a Python 2 AppEngine app to the new runtime is to switch datastore code to Google Cloud NDB.将 Python 2 AppEngine 应用升级到新运行时的推荐路径是将数据存储区代码切换到 Google Cloud NDB。 However, I can't find anything about unit testing code that uses Cloud NDB (which was previously possible using the Python 2 testbed library).但是,我找不到任何关于使用 Cloud NDB 的单元测试代码(以前可以使用 Python 2 测试平台库)。

How can Cloud NDB code be unit tested?如何对 Cloud NDB 代码进行单元测试? (apart from standard abstracting the Cloud NDB dependency yourself) (除了自己抽象 Cloud NDB 依赖项的标准)

Apparently , there is no way to unit test Cloud NDB code anymore. 显然,再也没有办法对 Cloud NDB 代码进行单元测试了。 The only testing solution available is the Cloud Datastore Emulator.唯一可用的测试解决方案是 Cloud Datastore Emulator。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM