mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #10075: Add a session_stats() method to SSLContext objects.
This commit is contained in:
parent
0518842b69
commit
b0182c8ca5
4 changed files with 81 additions and 5 deletions
|
@ -391,6 +391,23 @@ class ContextTests(unittest.TestCase):
|
|||
ctx.load_verify_locations(CERTFILE, CAPATH)
|
||||
ctx.load_verify_locations(CERTFILE, capath=BYTES_CAPATH)
|
||||
|
||||
def test_session_stats(self):
|
||||
for proto in PROTOCOLS:
|
||||
ctx = ssl.SSLContext(proto)
|
||||
self.assertEqual(ctx.session_stats(), {
|
||||
'number': 0,
|
||||
'connect': 0,
|
||||
'connect_good': 0,
|
||||
'connect_renegotiate': 0,
|
||||
'accept': 0,
|
||||
'accept_good': 0,
|
||||
'accept_renegotiate': 0,
|
||||
'hits': 0,
|
||||
'misses': 0,
|
||||
'timeouts': 0,
|
||||
'cache_full': 0,
|
||||
})
|
||||
|
||||
|
||||
class NetworkedTests(unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue