From f6824f7ade69475cb91a47119d7eac01dde0456d Mon Sep 17 00:00:00 2001 From: Jakub Roztocil Date: Wed, 2 Mar 2016 02:53:23 +0800 Subject: [PATCH] Cleanup --- httpie/cli.py | 2 -- httpie/client.py | 2 +- httpie/models.py | 2 +- tests/test_ssl.py | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/httpie/cli.py b/httpie/cli.py index 540a04ed..6e4e2be3 100644 --- a/httpie/cli.py +++ b/httpie/cli.py @@ -53,11 +53,9 @@ parser = HTTPieArgumentParser( https://github.com/jkbrzt/httpie/issues """), - usage='see http --help' ) - ####################################################################### # Positional arguments. ####################################################################### diff --git a/httpie/client.py b/httpie/client.py index 482f9dce..4ff4efb8 100644 --- a/httpie/client.py +++ b/httpie/client.py @@ -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 diff --git a/httpie/models.py b/httpie/models.py index 3f273b4e..ef359431 100644 --- a/httpie/models.py +++ b/httpie/models.py @@ -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 diff --git a/tests/test_ssl.py b/tests/test_ssl.py index 0fda4106..d23af11a 100644 --- a/tests/test_ssl.py +++ b/tests/test_ssl.py @@ -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):