我的GAE应用程序正常运行(使用dev_appserver.py app
)在本地主机上,并部署时(appcfg.py name update app/
)与谷歌AppEngine上使用pytest
然而,当我在测试代码运行py.test(在我的应用程序的目录),我得到一个导入错误:
app/main.py:4: in <module>
from google.appengine.ext import db
E ImportError: No module named google.appengine.ext
GAE在这里安装: /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
它包含google/appengine/ext/
我加入谷歌的云-SDK来我的$ PATH,并且在/usr/local/
一个符号链接到GAE:
lrwxr-xr-x 1 root admin google_appengine -> /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine
我怎样才能得到py.test找到google.appengine.ext?