from the webtest documentation I learn that:
The best way to simulate authentication is if your application looks in environ['REMOTE_USER'] to see if someone is authenticated. Then you can simply set that value, like:
app.get('/secret', extra_environ=dict(REMOTE_USER='bob'))
I am trying to do the same thing but in a Google App engine environment. I would like to simulate a logged in user and a user that's an administrator.
If possible which dictionary values do I have to set in extra_environ to accomplish this?
Set User:
Set Admin:
This is how my whole test looks like. My example uses webtest, nose, nosegae and gaetestbed.
Hope it helps.