Address CertificateError str repr is tuple, not str.
MODIFY
test/test_connection.py
test/test_connection.py
@@ -38,7 +38,7 @@ class TestConnection(object):
with mock.patch('urllib3.connection.log.error') as mock_log:
_match_hostname(cert, asserted_hostname)
except CertificateError as e:
- assert str(e) == "hostname 'bar' doesn't match 'foo'"
+ assert "hostname 'bar' doesn't match 'foo'" in str(e)
mock_log.assert_called_once_with(
'Certificate did not match expected hostname: %s. '
'Certificate: %s',

Address #1365. CertificateError str repr is tuple, not str.