| 1 |
import eventlet |
| 2 |
import tests |
| 3 |
|
| 4 |
__test__ = True |
| 5 |
|
| 6 |
|
| 7 |
def test_green_http_doesnt_change_original_module(): |
| 8 |
tests.run_isolated('green_http_doesnt_change_original_module.py') |
| 9 |
|
| 10 |
|
| 11 |
def test_green_httplib_doesnt_change_original_module(): |
| 12 |
tests.run_isolated('green_httplib_doesnt_change_original_module.py') |
| 13 |
|
| 14 |
|
| 15 |
def test_http_request_encode_chunked_kwarg(): |
| 16 |
# https://bugs.python.org/issue12319 |
| 17 |
# As of 2017-01 this test only verifies encode_chunked kwarg is properly accepted. |
| 18 |
# Stdlib http.client code was copied partially, chunked encoding may not work. |
| 19 |
from eventlet.green.http import client |
| 20 |
server_sock = eventlet.listen(('127.0.0.1', 0)) |
| 21 |
addr = server_sock.getsockname() |
| 22 |
h = client.HTTPConnection(host=addr[0], port=addr[1]) |
| 23 |
h.request('GET', '/', encode_chunked=True) |