Skip to content
Myr

Adds review changes

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Carol Willing · committed by Carol Willing · parent 8f17741 · Browse files · 2 files+4 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−3 removed

  • other:+4 added−3 removed

2 files+4 added−3 removed

modified:requests/models.py+2 added-2 removed
299 unmodified lines
300 self.prepare_method(method)301 self.prepare_url(url, params)302 self.prepare_headers(headers)303 self.prepare_cookies(cookies)304 self.prepare_body(data, files)304 self.prepare_body(data, files, json)305 self.prepare_auth(auth, url)306 # Note that prepare_auth must be last to enable authentication schemes307 # such as OAuth to work on a fully prepared request.308
132 unmodified lines
441 # Multi-part file uploads.442 if files:443 (body, content_type) = self._encode_files(files, data)444 else:445 if data:445 if data and not _json:446 body = self._encode_params(data)447 if not _json:448 if isinstance(data, basestring) or hasattr(data, 'read'):449 content_type = None
377 unmodified lines
modified:test_requests.py+2 added-1 removed
990 unmodified lines
991 httpbin('post'),992 json={'life': 42}993 )994 assert r.status_code == 200995 assert 'application/json' in r.headers['Content-Type']995 assert 'application/json' in r.request.headers['Content-Type']996 #assert {'life': 42} == r.json()['json']997998999class TestContentEncodingDetection(unittest.TestCase):1000
490 unmodified lines