I am trying to use geaunit in my gae proj开发者_StackOverflow社区ect. As is recommended, I have put the gaeunit.py file in my project root directory, added the required lines to app.yaml, and placed a test directory in the project root directory.
If I go to http://localhost:8080/test when I am logged in as an administrator I get "Oops! This link appears to be broken."
If I go to http://localhost:8080/test when not logged in as admin I get "Current logged in user test@example.com is not authorized to view this page."
app.yaml
application: myproject
version: 1
runtime: python
api_version: 1
handlers:
- url: /static
static_dir: app/static
- url: /test.*
login: admin # This is important if you deploy the test directory in production!
script: gaeunit.py
- url: /.*
script: main.py
login: required
secure: always
Project structure
/myproject
/app.yaml
/gaeunit.py
/test
What am I doing wrong?
精彩评论