(self)
| 2017 | self.assertEqual(h.timeout, 30) |
| 2018 | |
| 2019 | def test_networked(self): |
| 2020 | # Default settings: requires a valid cert from a trusted CA |
| 2021 | import ssl |
| 2022 | support.requires('network') |
| 2023 | with socket_helper.transient_internet('self-signed.pythontest.net'): |
| 2024 | h = client.HTTPSConnection('self-signed.pythontest.net', 443) |
| 2025 | with self.assertRaises(ssl.SSLError) as exc_info: |
| 2026 | h.request('GET', '/') |
| 2027 | self.assertEqual(exc_info.exception.reason, 'CERTIFICATE_VERIFY_FAILED') |
| 2028 | |
| 2029 | def test_networked_noverification(self): |
| 2030 | # Switch off cert verification |
nothing calls this directly
no test coverage detected