-
Notifications
You must be signed in to change notification settings - Fork 431
Using transport helper for calling http.request(). #586
Using transport helper for calling http.request(). #586
Conversation
request_method = mock.Mock( | ||
return_value=(response, content.encode('utf-8'))) | ||
# Make sure the mock doesn't have a request attr. | ||
del request_method.request |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
It still seems strange to me that |
@jonparrott Baby steps |
But it makes me feel icky. But more seriously this looks fine so long as there's another PR to nix the http arg. |
Actually, why not go ahead and make http an optional arg to |
I'd rather have a discussion first about your idea of "under the covers" vs. up-front
|
@@ -1381,6 +1390,10 @@ def _do_retrieve_scopes_test_helper(self, response, content, | |||
assertUrisEqual(self, token_uri, called_uri) | |||
logger.info.assert_called_once_with('Refreshing scopes') | |||
|
|||
http_request.assert_called_once_with( | |||
token_uri, method='GET', body=None, headers=None, | |||
redirections=5, connection_type=None) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
c659320
to
89e63fc
Compare
SG. |
@jonparrott Good to merge? @nathanielmanistaatgoogle any thoughts? |
I'm fine with it for now. |
Resolve conflicts and poke me again? |
This assumes (for now) that http is an instance of httplib.Http.
89e63fc
to
26cdf2d
Compare
@nathanielmanistaatgoogle resolved |
This (reference to
http.request
) assumes (for now) thathttp
is an instance ofhttplib.Http
.Alternative approach to #583. Towards #128.
Note that this PR stops short of
http
instead ofhttp.request
http_request
tohttp