@@ -1196,12 +1196,8 @@ def test_create_connection_happy_eyeballs_empty_exceptions(self, m_socket):
11961196        # results in empty exceptions list 
11971197
11981198        async  def  getaddrinfo (* args , ** kw ):
1199-             return  [
1200-                 (socket .AF_INET , socket .SOCK_STREAM , socket .IPPROTO_TCP ,
1201-                  '' , ('127.0.0.1' , 80 )),
1202-                 (socket .AF_INET6 , socket .SOCK_STREAM , socket .IPPROTO_TCP ,
1203-                  '' , ('::1' , 80 )),
1204-             ]
1199+             return  [(socket .AF_INET , socket .SOCK_STREAM , 0 , '' , ('127.0.0.1' , 80 )),
1200+                     (socket .AF_INET6 , socket .SOCK_STREAM , 0 , '' , ('::1' , 80 ))]
12051201
12061202        def  getaddrinfo_task (* args , ** kwds ):
12071203            return  self .loop .create_task (getaddrinfo (* args , ** kwds ))
@@ -1225,9 +1221,8 @@ async def mock_race(coro_fns, delay, loop):
12251221                self .loop .run_until_complete (coro )
12261222
12271223    def  test_create_connection_host_port_sock (self ):
1228-         # host, port and sock are specified 
12291224        coro  =  self .loop .create_connection (
1230-             MyProto , 'example.com' , 80 , sock = mock . Mock ())
1225+             MyProto , 'example.com' , 80 , sock = object ())
12311226        self .assertRaises (ValueError , self .loop .run_until_complete , coro )
12321227
12331228    def  test_create_connection_wrong_sock (self ):
0 commit comments