-
Notifications
You must be signed in to change notification settings - Fork 430
Force GCE metadata querying to be done without proxies #120
Conversation
|
I understand that this draft is failing the test because urlopen should be called at least once. (see test_oauth2client.py. That being said according to urllib2.py urlopen ends up making a call to open anyway. Is that ok @craigcitro ? |
|
@aaronwinter i suspect it's just that the call doesn't match the expected one in the mock; can you look at updating it? (it's probably just that it needs the args to match.) |
oauth2client/client.py
Outdated
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Use six to call raw_input for Python 3 support
|
@craigcitro I have updated the arguments passed to open but the test is still failing. I am not very well versed with unittest. Can you take a quick look at it? |
tests/test_oauth2client.py
Outdated
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Please squash commits and push a new draft that passes tests? |
Squash commits from master repository
Previously the mock's name was overriding the built-in 'open', also the arguments were no matching correctly for both test_get_environment_gce_production and test_get_environment_unknown. This should fix the problem!
|
@nathanielmanistaatgoogle I'm closing this since #293 handles it. @aaronwinter Feel free to re-open if you feel like my change misses something. ASIDE: It'd be nice to get it in before cutting |
Following issue #114