(self)
| 1595 | self.assertEqual(cm.exception.errno, ssl.SSL_ERROR_SSL) |
| 1596 | |
| 1597 | def test_sni_callback_refcycle(self): |
| 1598 | # Reference cycles through the servername callback are detected |
| 1599 | # and cleared. |
| 1600 | ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) |
| 1601 | def dummycallback(sock, servername, ctx, cycle=ctx): |
| 1602 | pass |
| 1603 | ctx.set_servername_callback(dummycallback) |
| 1604 | wr = weakref.ref(ctx) |
| 1605 | del ctx, dummycallback |
| 1606 | gc.collect() |
| 1607 | self.assertIs(wr(), None) |
| 1608 | |
| 1609 | def test_cert_store_stats(self): |
| 1610 | ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) |
nothing calls this directly
no test coverage detected