'Ensure that a byte stream with size > 0 will not set both a Content-Length
and Transfer-Encoding header.'

def test_stream_with_auth_does_not_set_transfer_encoding_header(self, httpbin):

    auth = ('user', 'pass')
    url = httpbin('post')
    file_obj = io.BytesIO('test    data')
    r = requests.Request('POST', url, auth=auth, data=file_obj)
    prepared_request = r.prepare()
    assert ('Transfer-Encoding' not in prepared_request.headers)
    assert ('Content-Length' in prepared_request.headers)
