Add --verify true/false tests and CHANGELOG

This commit is contained in:
Jakub Roztocil 2017-02-17 00:56:07 +01:00
parent cf8d5eb3e8
commit 7321b9fa4e
4 changed files with 12 additions and 5 deletions

View File

@ -8,6 +8,8 @@ This project adheres to `Semantic Versioning <http://semver.org/>`_.
`1.0.0-dev`_ (unreleased)
-------------------------
* ``--verify`` now accepts ``true``/``false`` in addition to ``yes``/``no``
and the boolean value is case-insensitive.
`0.9.8`_ (2016-12-08)
---------------------

View File

@ -2,8 +2,8 @@
HTTPie - a CLI, cURL-like tool for humans.
"""
__author__ = 'Jakub Roztocil'
__version__ = '1.0.0-dev'
__author__ = 'Jakub Roztocil'
__licence__ = 'BSD'

View File

@ -544,10 +544,10 @@ ssl.add_argument(
'--verify',
default='yes',
help="""
Set to "no" to skip checking the host's SSL certificate. You can also pass
the path to a CA_BUNDLE file for private certs. You can also set the
REQUESTS_CA_BUNDLE environment variable. Defaults to "yes".
Set to "no" (or "false") to skip checking the host's SSL certificate.
Defaults to "yes" ("true"). You can also pass the path to a CA_BUNDLE file
for private certs. (Or you can set the REQUESTS_CA_BUNDLE environment
variable instead.)
"""
)
ssl.add_argument(

View File

@ -73,6 +73,11 @@ class TestServerCert:
r = http(httpbin_secure.url + '/get', '--verify=no')
assert HTTP_OK in r
@pytest.mark.parametrize('verify_value', ['false', 'fALse'])
def test_verify_false_OK(self, httpbin_secure, verify_value):
r = http(httpbin_secure.url + '/get', '--verify', verify_value)
assert HTTP_OK in r
def test_verify_custom_ca_bundle_path(
self, httpbin_secure_untrusted):
r = http(httpbin_secure_untrusted + '/get', '--verify', CA_BUNDLE)