Skip to content

Commit

Permalink
Address #1365. CertificateError str repr is tuple, not str.
Browse files Browse the repository at this point in the history
  • Loading branch information
crwilcox committed Apr 20, 2018
1 parent 9782e1f commit edd7a00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_connection.py
Expand Up @@ -38,7 +38,7 @@ def test_match_hostname_mismatch(self):
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',
Expand Down

0 comments on commit edd7a00

Please sign in to comment.