我的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?