mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-16 06:47:09 +03:00
python3Packages.cheroot: fix tests
patches no longer needed
This commit is contained in:
parent
5f06ba50e2
commit
749c53f144
@ -15,8 +15,6 @@ buildPythonPackage rec {
|
||||
sha256 = "5b525b3e4a755adf78070ab54c1821fb860d4255a9317dba2b88eb2df2441cff";
|
||||
};
|
||||
|
||||
patches = [ ./tests.patch ];
|
||||
|
||||
nativeBuildInputs = [ setuptools_scm setuptools-scm-git-archive ];
|
||||
|
||||
propagatedBuildInputs = [ more-itertools six backports_functools_lru_cache ];
|
||||
|
@ -1,45 +0,0 @@
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user