Skip to content

Commit

Permalink
test_https: Fix Windows error exception type
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Aug 24, 2018
1 parent 045a19a commit 5a8ab59
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/with_dummyserver/test_https.py
Expand Up @@ -38,6 +38,7 @@
SystemTimeWarning,
InsecurePlatformWarning,
MaxRetryError,
ProtocolError,
)
from urllib3.packages import six
from urllib3.util.timeout import Timeout
Expand Down Expand Up @@ -102,8 +103,11 @@ def test_client_no_intermediate(self):
'unknown Cert Authority' in str(e) or
# https://github.com/urllib3/urllib3/issues/1422
'connection closed via error' in str(e) or
'WSAECONNRESET' in str(e) or
'An existing connection was forcibly closed by the remote host' in str(e)):
'WSAECONNRESET' in str(e)):
raise
except ProtocolError as e:
# https://github.com/urllib3/urllib3/issues/1422
if not ('An existing connection was forcibly closed by the remote host' in str(e)):
raise

def test_verified(self):
Expand Down

0 comments on commit 5a8ab59

Please sign in to comment.