From: Ben Darnell Date: Sun, 12 Jun 2016 18:12:45 +0000 (-0400) Subject: netutil_test: use 127.0.0.1 instead of localhost X-Git-Tag: v4.4.0b1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ec71d46a83eade88f6d588f8f568f9759676c89;p=thirdparty%2Ftornado.git netutil_test: use 127.0.0.1 instead of localhost The first binding of the port was to 127.0.0.1, so the second should be too. This may solve #1734. --- diff --git a/tornado/test/netutil_test.py b/tornado/test/netutil_test.py index a645bef21..549c4fe1c 100644 --- a/tornado/test/netutil_test.py +++ b/tornado/test/netutil_test.py @@ -207,7 +207,7 @@ class TestPortAllocation(unittest.TestCase): sockets = [] socket, port = bind_unused_port(reuse_port=True) try: - sockets = bind_sockets(port, 'localhost', reuse_port=True) + sockets = bind_sockets(port, '127.0.0.1', reuse_port=True) self.assertTrue(all(s.getsockname()[1] == port for s in sockets)) finally: socket.close()