Question

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.

No correct solution

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top