(self)
| 448 | server.server_close() |
| 449 | |
| 450 | def test_invalid_certdata(self): |
| 451 | invalid_certdata = [ |
| 452 | (self.BADCERT, None, None), |
| 453 | (self.EMPTYCERT, None, None), |
| 454 | (self.ONLYCERT, None, None), |
| 455 | (self.ONLYKEY, None, None), |
| 456 | (self.ONLYKEY, self.ONLYCERT, None), |
| 457 | (self.CERTFILE_PROTECTED, None, self.BADPASSWORD), |
| 458 | # TODO: test the next case and add same case to test_ssl (We |
| 459 | # specify a cert and a password-protected file, but no password): |
| 460 | # (self.CERTFILE_PROTECTED, None, None), |
| 461 | # see issue #132102 |
| 462 | ] |
| 463 | for certfile, keyfile, password in invalid_certdata: |
| 464 | with self.subTest( |
| 465 | certfile=certfile, keyfile=keyfile, password=password |
| 466 | ): |
| 467 | with self.assertRaises(ssl.SSLError): |
| 468 | create_https_server(certfile, keyfile, password) |
| 469 | |
| 470 | |
| 471 | class RequestHandlerLoggingTestCase(BaseTestCase): |
nothing calls this directly
no test coverage detected