python - how to write cloud endpoints unittests with authentication? -
i'm writing unittests (using webtest) cloud endpoints api written in python. 1 of these methods requires authentication. i've set user_id, user_email , user_is_admin testbed.setup_env(), doesn't seem work. what's best way mock authentication endpoints unittests?
turns out right reply mock out endpoints.get_current_user() , perchance oauth.is_current_user_admin()!
python google-app-engine google-cloud-endpoints
No comments:
Post a Comment