(self)
| 2146 | self.assertEqual(exc_info.exception.reason, 'CERTIFICATE_VERIFY_FAILED') |
| 2147 | |
| 2148 | def test_local_unknown_cert(self): |
| 2149 | # The custom cert isn't known to the default trust bundle |
| 2150 | import ssl |
| 2151 | server = self.make_server(CERT_localhost) |
| 2152 | h = client.HTTPSConnection('localhost', server.port) |
| 2153 | with self.assertRaises(ssl.SSLError) as exc_info: |
| 2154 | h.request('GET', '/') |
| 2155 | self.assertEqual(exc_info.exception.reason, 'CERTIFICATE_VERIFY_FAILED') |
| 2156 | |
| 2157 | def test_local_good_hostname(self): |
| 2158 | # The (valid) cert validates the HTTPS hostname |
nothing calls this directly
no test coverage detected