Moved test_chunked_upload to test_requests.py

This commit is contained in:
Braulio Valdivielso Martínez
2016-03-03 22:13:47 +01:00
parent 567b31080e
commit f17ef753d2
-17
View File
@@ -157,23 +157,6 @@ class TestContentEncodingDetection:
'''.strip()
assert get_encodings_from_content(content) == ['HTML5', 'HTML4', 'XML']
def test_chunked_upload(self):
"""can safely send generators"""
block_server = threading.Event()
server = Server.basic_response_server(wait_to_close_event=block_server)
data = (i for i in [b'a', b'b', b'c'])
with server as (host, port):
url = 'http://{0}:{1}/'.format(host, port)
r = requests.post(url, data=data, stream=True)
block_server.set() # release server block
assert r.status_code == 200
assert r.request.headers['Transfer-Encoding'] == 'chunked'
USER = PASSWORD = "%!*'();:@&=+$,/?#[] "
ENCODED_USER = compat.quote(USER, '')
ENCODED_PASSWORD = compat.quote(PASSWORD, '')