(self)
| 2063 | self.assertEqual(h.timeout, 30) |
| 2064 | |
| 2065 | def test_networked(self): |
| 2066 | # Default settings: requires a valid cert from a trusted CA |
| 2067 | import ssl |
| 2068 | support.requires('network') |
| 2069 | with socket_helper.transient_internet('self-signed.pythontest.net'): |
| 2070 | h = client.HTTPSConnection('self-signed.pythontest.net', 443) |
| 2071 | with self.assertRaises(ssl.SSLError) as exc_info: |
| 2072 | h.request('GET', '/') |
| 2073 | self.assertEqual(exc_info.exception.reason, 'CERTIFICATE_VERIFY_FAILED') |
| 2074 | |
| 2075 | def test_networked_noverification(self): |
| 2076 | # Switch off cert verification |
nothing calls this directly
no test coverage detected