Revision 0351944b lib/rapi/testutils.py
b/lib/rapi/testutils.py | ||
---|---|---|
187 | 187 |
"%s %s" % (http.auth.HTTP_BASIC_AUTH, base64.b64encode(userpwd)) |
188 | 188 |
|
189 | 189 |
path = _GetPathFromUri(url) |
190 |
(code, resp_body) = \ |
|
190 |
(code, _, resp_body) = \
|
|
191 | 191 |
self._handler.FetchResponse(path, method, headers, request_body) |
192 | 192 |
|
193 | 193 |
self._info[pycurl.RESPONSE_CODE] = code |
... | ... | |
223 | 223 |
@param request_body: Request body |
224 | 224 |
@type headers: mimetools.Message |
225 | 225 |
@param headers: Request headers |
226 |
@return: Tuple containing status code and response body |
|
226 |
@return: Tuple containing status code, response headers and response body
|
|
227 | 227 |
|
228 | 228 |
""" |
229 | 229 |
req_msg = http.HttpMessage() |
... | ... | |
235 | 235 |
(_, _, _, resp_msg) = \ |
236 | 236 |
http.server.HttpResponder(self.handler)(lambda: (req_msg, None)) |
237 | 237 |
|
238 |
return (resp_msg.start_line.code, resp_msg.body) |
|
238 |
return (resp_msg.start_line.code, resp_msg.headers, resp_msg.body)
|
|
239 | 239 |
|
240 | 240 |
|
241 | 241 |
class _TestLuxiTransport: |
Also available in: Unified diff