mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-37027: Return a proxy socket object from transp.get_extra_info('socket') (GH-13530)
Return a safe to use proxy socket object from `transport.get_extra_info('socket')` https://bugs.python.org/issue37027
This commit is contained in:
parent
674ee12600
commit
8cd5165ba0
7 changed files with 220 additions and 9 deletions
|
@ -1118,7 +1118,7 @@ class EventLoopTestsMixin:
|
|||
f = self.loop.create_server(TestMyProto, sock=sock_ob)
|
||||
server = self.loop.run_until_complete(f)
|
||||
sock = server.sockets[0]
|
||||
self.assertIs(sock, sock_ob)
|
||||
self.assertEqual(sock.fileno(), sock_ob.fileno())
|
||||
|
||||
host, port = sock.getsockname()
|
||||
self.assertEqual(host, '0.0.0.0')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue