mirror of
https://github.com/httpie/cli.git
synced 2025-06-27 13:01:43 +02:00
fix test_ssl_version on pypy
This commit is contained in:
parent
4d299a5531
commit
29df4cd4f3
@ -5,6 +5,7 @@ import pytest_httpbin.certs
|
|||||||
import requests.exceptions
|
import requests.exceptions
|
||||||
|
|
||||||
from httpie import ExitStatus
|
from httpie import ExitStatus
|
||||||
|
from httpie.compat import is_pypy
|
||||||
from httpie.input import SSL_VERSION_ARG_MAPPING
|
from httpie.input import SSL_VERSION_ARG_MAPPING
|
||||||
from utils import HTTP_OK, TESTS_ROOT, http
|
from utils import HTTP_OK, TESTS_ROOT, http
|
||||||
|
|
||||||
@ -43,8 +44,8 @@ def test_ssl_version(httpbin_secure, ssl_version):
|
|||||||
)
|
)
|
||||||
assert HTTP_OK in r
|
assert HTTP_OK in r
|
||||||
except ssl_errors as e:
|
except ssl_errors as e:
|
||||||
if ssl_version == 'ssl3':
|
if ssl_version == 'ssl3' and not is_pypy:
|
||||||
# pytest-httpbin doesn't support ssl3
|
# pytest-httpbin doesn't support ssl3 (unless on pypy)
|
||||||
assert 'SSLV3_ALERT_HANDSHAKE_FAILURE' in str(e)
|
assert 'SSLV3_ALERT_HANDSHAKE_FAILURE' in str(e)
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
Loading…
x
Reference in New Issue
Block a user