mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
asyncio: Add set_protocol / get_protocol methods to Transports
This commit is contained in:
parent
06e18a7c24
commit
a05a6ef1ca
7 changed files with 45 additions and 0 deletions
|
@ -25,6 +25,7 @@ class SslProtoHandshakeTests(test_utils.TestCase):
|
|||
sslcontext = test_utils.dummy_ssl_context()
|
||||
app_proto = asyncio.Protocol()
|
||||
proto = sslproto.SSLProtocol(self.loop, app_proto, sslcontext, waiter)
|
||||
self.assertIs(proto._app_transport.get_protocol(), app_proto)
|
||||
self.addCleanup(proto._app_transport.close)
|
||||
return proto
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue