]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
netutil_test: use 127.0.0.1 instead of localhost
authorBen Darnell <ben@bendarnell.com>
Sun, 12 Jun 2016 18:12:45 +0000 (14:12 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 12 Jun 2016 18:12:45 +0000 (14:12 -0400)
The first binding of the port was to 127.0.0.1, so the second should be
too. This may solve #1734.

tornado/test/netutil_test.py

index a645bef21d954f9ba5adef9f110ff139e17b07b2..549c4fe1c69edbbc642e9369db3a382629337833 100644 (file)
@@ -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()