Skip to content

Commit

Permalink
Change order of arguments in mock http.request.
Browse files Browse the repository at this point in the history
Noticed this while documenting the httplib2.Http.request()
interface and our use of it
  • Loading branch information
dhermes committed Aug 31, 2015
1 parent dd35f25 commit 34465f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gcloud/storage/test_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,8 @@ def _make_request(self, method, url, data=None, content_type=None,
if content_type is not None: # pragma: NO COVER
headers['Content-Type'] = content_type

return self.http.request(method, uri=url, headers=headers, body=data)
return self.http.request(uri=url, method=method,
headers=headers, body=data)

def api_request(self, method, path, query_params=None,
data=None, content_type=None,
Expand All @@ -595,7 +596,7 @@ def __init__(self, *responses):
self._requests = []
self._responses = list(responses)

def request(self, method, uri, headers, body):
def request(self, uri, method, headers, body):
self._requests.append((method, uri, headers, body))
response, self._responses = self._responses[0], self._responses[1:]
return response
Expand Down

0 comments on commit 34465f0

Please sign in to comment.