문제

I am currently using gaeunit to perform automated test on my google app engine application. I am wondering whether it's possible to simulate the user login action using his/her google account using gaeunit?

Thank you very much.

올바른 솔루션이 없습니다

다른 팁

Two situations:

  1. Local Dev server: login is mocked via a simple web form. You can do a http POST to log in.

  2. Production server: login goes through the Google auth infrastructure. No way to mock this. To make this work you'd need to code around it.

The dev server login is emulated just by setting environment variables. You can fake a login with three lines of python to set the three env variables, then the User API will behave as if you're logged in.

http://eatdev.tumblr.com/post/13070970245/faking-gae-user-authentication-locally-for-django

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top