From: Anthony Baxter Date: Mon, 3 Apr 2006 16:42:41 +0000 (+0000) Subject: backport r43579 X-Git-Tag: v2.4.4c1~292 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=119dc70379072d46ed01dfc9df40924ae7d33634;p=thirdparty%2FPython%2Fcpython.git backport r43579 Deal with openbsd's different style of default /etc/hosts by forcing the fqdn lookup to use the IP address returned by gethosbyname. --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index b138a2dfdfb4..14e80f1a4087 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -268,7 +268,7 @@ class GeneralModuleTests(unittest.TestCase): # Probably a similar problem as above; skip this test return all_host_names = [hostname, hname] + aliases - fqhn = socket.getfqdn() + fqhn = socket.getfqdn(ip) if not fqhn in all_host_names: self.fail("Error testing host resolution mechanisms.")