def test_adminindex_admin(self):
    os.environ['USER_EMAIL'] = 'info@example.com'
os.environ['USER_IS_ADMIN'] = '1'
response = app.get(url_map['adminindex'])
self.assertOK(response)
Google App Engine: Webtest simulating logged in user and administrator