summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio/test_sslproto.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_sslproto.py')
-rw-r--r--Lib/test/test_asyncio/test_sslproto.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_sslproto.py b/Lib/test/test_asyncio/test_sslproto.py
index bcd236ea26..f573ae8fe7 100644
--- a/Lib/test/test_asyncio/test_sslproto.py
+++ b/Lib/test/test_asyncio/test_sslproto.py
@@ -121,6 +121,14 @@ class SslProtoHandshakeTests(test_utils.TestCase):
ssl_proto.connection_lost(None)
self.assertIsNone(ssl_proto._get_extra_info('socket'))
+ def test_set_new_app_protocol(self):
+ waiter = asyncio.Future(loop=self.loop)
+ ssl_proto = self.ssl_protocol(waiter)
+ new_app_proto = asyncio.Protocol()
+ ssl_proto._app_transport.set_protocol(new_app_proto)
+ self.assertIs(ssl_proto._app_transport.get_protocol(), new_app_proto)
+ self.assertIs(ssl_proto._app_protocol, new_app_proto)
+
if __name__ == '__main__':
unittest.main()