]> granicus.if.org Git - python/commitdiff
#14758: Fix the fix (fix getaddrinfo in mock_socket)
authorR David Murray <rdmurray@bitdance.com>
Wed, 11 Jun 2014 20:10:10 +0000 (16:10 -0400)
committerR David Murray <rdmurray@bitdance.com>
Wed, 11 Jun 2014 20:10:10 +0000 (16:10 -0400)
I forgot to run all the affected tests when I fixed smtpd.

Lib/test/mock_socket.py

index a4fbca6369c4f2a50dd4257fb47dffc8ab8fe9e0..441e29f2ae095ddb556fcce6e4ec113eb1cbcdb2 100644 (file)
@@ -144,8 +144,8 @@ def gethostname():
 def gethostbyname(name):
     return ""
 
-def getaddrinfo(host, port):
-    return socket_module.getaddrinfo(host, port)
+def getaddrinfo(*args, **kw):
+    return socket_module.getaddrinfo(*args, **kw)
 
 gaierror = socket_module.gaierror
 error = socket_module.error
@@ -154,6 +154,6 @@ error = socket_module.error
 # Constants
 AF_INET = socket_module.AF_INET
 AF_INET6 = socket_module.AF_INET6
-SOCK_STREAM = None
+SOCK_STREAM = socket_module.SOCK_STREAM
 SOL_SOCKET = None
 SO_REUSEADDR = None