Comment out testHostnameRes() -- it depends on a correctly working
DNS, and we can't assume that.
This commit is contained in:
parent
7b8bac106a
commit
597257b940
@ -207,16 +207,16 @@ class GeneralModuleTests(unittest.TestCase):
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def testHostnameRes(self):
|
## def testHostnameRes(self):
|
||||||
"""Testing hostname resolution mechanisms."""
|
## """Testing hostname resolution mechanisms."""
|
||||||
hostname = socket.gethostname()
|
## hostname = socket.gethostname()
|
||||||
ip = socket.gethostbyname(hostname)
|
## ip = socket.gethostbyname(hostname)
|
||||||
self.assert_(ip.find('.') >= 0, "Error resolving host to ip.")
|
## self.assert_(ip.find('.') >= 0, "Error resolving host to ip.")
|
||||||
hname, aliases, ipaddrs = socket.gethostbyaddr(ip)
|
## hname, aliases, ipaddrs = socket.gethostbyaddr(ip)
|
||||||
all_host_names = [hname] + aliases
|
## all_host_names = [hname] + aliases
|
||||||
fqhn = socket.getfqdn()
|
## fqhn = socket.getfqdn()
|
||||||
if not fqhn in all_host_names:
|
## if not fqhn in all_host_names:
|
||||||
self.fail("Error testing host resolution mechanisms.")
|
## self.fail("Error testing host resolution mechanisms.")
|
||||||
|
|
||||||
def testRefCountGetNameInfo(self):
|
def testRefCountGetNameInfo(self):
|
||||||
"""Testing reference count for getnameinfo."""
|
"""Testing reference count for getnameinfo."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user