This commit is contained in:
Jakub Roztocil 2016-03-02 02:53:23 +08:00
parent 7fd46e0b0d
commit f6824f7ade
4 changed files with 4 additions and 6 deletions

View File

@ -53,11 +53,9 @@ parser = HTTPieArgumentParser(
https://github.com/jkbrzt/httpie/issues
"""),
usage='see http --help'
)
#######################################################################
# Positional arguments.
#######################################################################

View File

@ -38,7 +38,6 @@ def get_requests_session():
def get_response(args, config_dir):
"""Send the request and return a `request.Response`."""
requests_session = get_requests_session()
requests_session.max_redirects = args.max_redirects
@ -64,6 +63,7 @@ def dump_request(kwargs):
% pformat(kwargs))
def encode_headers(headers):
# This allows for unicode headers which is non-standard but practical.
# See: https://github.com/jkbrzt/httpie/issues/212

View File

@ -48,7 +48,7 @@ class HTTPResponse(HTTPMessage):
def iter_lines(self, chunk_size):
return ((line, b'\n') for line in self._orig.iter_lines(chunk_size))
#noinspection PyProtectedMember
# noinspection PyProtectedMember
@property
def headers(self):
original = self._orig.raw._original_response

View File

@ -18,7 +18,7 @@ CLIENT_PEM = os.path.join(TESTS_ROOT, 'client_certs', 'client.pem')
CA_BUNDLE = pytest_httpbin.certs.where()
class TestClientSSLCertHandling(object):
class TestClientCert:
def test_cert_file_not_found(self, httpbin_secure):
r = http(httpbin_secure + '/get',
@ -54,7 +54,7 @@ class TestClientSSLCertHandling(object):
assert HTTP_OK in r
class TestServerSSLCertHandling(object):
class TestServerCert:
def test_self_signed_server_cert_by_default_raises_ssl_error(
self, httpbin_secure):