From cf0a2a8576b4780263cfeb96d081eea06a1ebe92 Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Mon, 3 Apr 2006 08:10:33 +0000 Subject: [PATCH] Deal with openbsd's different style of default /etc/hosts by forcing the fqdn lookup to use the IP address returned by gethosbyname. --- Lib/test/test_socket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index f9d8313adff..46468a63c5b 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. (fqdn: %s, all: %s)" % (fqhn, repr(all_host_names)))