mirror of
https://github.com/httpie/cli.git
synced 2024-11-24 08:22:22 +02:00
Cleanup
This commit is contained in:
parent
7fd46e0b0d
commit
f6824f7ade
@ -53,11 +53,9 @@ parser = HTTPieArgumentParser(
|
||||
https://github.com/jkbrzt/httpie/issues
|
||||
|
||||
"""),
|
||||
usage='see http --help'
|
||||
)
|
||||
|
||||
|
||||
|
||||
#######################################################################
|
||||
# Positional arguments.
|
||||
#######################################################################
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user