Skip to content
Myr

minor doc string cleanup

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

authored by Nate Prewitt · committed by Nate Prewitt · parent 14d71fd · Browse files · 1 file+6 added−2 removed
This commit

State

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

Diff stats

1 file+6 added−2 removed

  • tests:+6 added−2 removed

1 file+6 added−2 removed

modified:tests/test_requests.py+6 added-2 removed
1693 unmodified lines
1694 assert resp.raw.closed16951696 def test_empty_stream_with_auth_does_not_set_content_length_header(self, httpbin):1697 """Ensure that a byte stream with size 0 will not set both a Content-Length1698 and Transfer-Encoding header1698 and Transfer-Encoding header.1699 """1700 auth = ('user', 'pass')1701 url = httpbin('post')1702 file_obj = io.BytesIO(b'')
3 unmodified lines
1706 assert 'Content-Length' not in prepared_request.headers17071708 def test_stream_with_auth_does_not_set_transfer_encoding_header(self, httpbin):1709 """Ensure that a byte stream with size > 0 will not set both a Content-Length1710 and Transfer-Encoding header"""1710 and Transfer-Encoding header.1711 """1712 auth = ('user', 'pass')1713 url = httpbin('post')1714 file_obj = io.BytesIO(b'test data')1715 r = requests.Request('POST', url, auth=auth, data=file_obj)
1 unmodified line
1717 assert 'Transfer-Encoding' not in prepared_request.headers1718 assert 'Content-Length' in prepared_request.headers17191720 def test_chunked_upload_does_not_set_content_length_header(self, httpbin):1721 """Ensure that requests with a generator body stream using1722 Transfer-Encoding: chunked, not a Content-Length header.1723 """1724 data = (i for i in [b'a', b'b', b'c'])1725 url = httpbin('post')1726 r = requests.Request('POST', url, data=data)1727 prepared_request = r.prepare()
557 unmodified lines