1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
diff --git a/cheroot/test/test_ssl.py b/cheroot/test/test_ssl.py
index fe8a0a0..92a77c1 100644
--- a/cheroot/test/test_ssl.py
+++ b/cheroot/test/test_ssl.py
@@ -316,11 +316,9 @@ def test_tls_client_auth(
expected_ssl_errors = (
requests.exceptions.SSLError,
OpenSSL.SSL.Error,
- ) if PY34 else (
- requests.exceptions.SSLError,
+ requests.exceptions.ConnectionError,
)
- if IS_WINDOWS:
- expected_ssl_errors += requests.exceptions.ConnectionError,
+
with pytest.raises(expected_ssl_errors) as ssl_err:
make_https_request()
@@ -335,7 +333,7 @@ def test_tls_client_auth(
except AttributeError:
if PY34:
pytest.xfail('OpenSSL behaves wierdly under Python 3.4')
- elif six.PY3 and IS_WINDOWS:
+ elif six.PY3:
err_text = str(ssl_err.value)
else:
raise
@@ -348,8 +346,7 @@ def test_tls_client_auth(
if IS_MACOS and IS_PYPY and adapter_type == 'pyopenssl':
expected_substrings = ('tlsv1 alert unknown ca', )
if (
- IS_WINDOWS
- and tls_verify_mode in (
+ tls_verify_mode in (
ssl.CERT_REQUIRED,
ssl.CERT_OPTIONAL,
)
@@ -361,6 +358,7 @@ def test_tls_client_auth(
"SysCallError(10054, 'WSAECONNRESET')",
"('Connection aborted.', "
'OSError("(10054, \'WSAECONNRESET\')"))',
+ 'OSError("(104, \'ECONNRESET\')"))',
)
assert any(e in err_text for e in expected_substrings)
|