Skip to content
Myr

Test chunked upload doesn't set content length

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

authored by Casey Davidson · committed by Nate Prewitt · parent 2d2c831 · Browse files · 2 files+9 added−0 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+9 added−0 removed

  • tests:+8 added−0 removed
  • other:+1 added−0 removed

2 files+9 added−0 removed

modified:tests/test_requests.py+8 added
1714 unmodified lines
1715 prepared_request = r.prepare()1716 assert 'Transfer-Encoding' not in prepared_request.headers1717 assert 'Content-Length' in prepared_request.headers17181719 def test_chunked_upload_does_not_set_content_length_header(self, httpbin):1720 data = (i for i in [b'a', b'b', b'c'])1721 url = httpbin('post')1722 r = requests.Request('POST', url, data=data)1723 prepared_request = r.prepare()1724 assert 'Transfer-Encoding' in prepared_request.headers1725 assert 'Content-Length' not in prepared_request.headers172617271728class TestCaseInsensitiveDict:17291730 @pytest.mark.parametrize(1731 'cid', (
549 unmodified lines
modified:AUTHORS.rst+1 added
171 unmodified lines
172- Brian Bamsch <bbamsch32@gmail.com> (`@bbamsch <https://github.com/bbamsch>`_)173- Om Prakash Kumar <omprakash070@gmail.com> (`@iamprakashom <https://github.com/iamprakashom>`_)174- Philipp Konrad <gardiac2002@gmail.com> (`@gardiac2002 <https://github.com/gardiac2002>`_)175- Hussain Tamboli <hussaintamboli18@gmail.com> (`@hussaintamboli <https://github.com/hussaintamboli>`_)176- Casey Davidson (`@davidsoncasey <https://github.com/davidsoncasey>`_)