]> granicus.if.org Git - python/commitdiff
Try to fix several networking tests. The problem is that if hosts have
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 11 Jun 2006 20:25:56 +0000 (20:25 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 11 Jun 2006 20:25:56 +0000 (20:25 +0000)
a search path setup, some of these hosts resolve to the wrong address.
By appending a period to the hostname, the hostname should only resolve
to what we want it to resolve to.  Hopefully this doesn't break different bots.

Lib/test/test_timeout.py
Lib/test/test_urllib2net.py
Lib/test/test_urllibnet.py

index 4309e8c7794658298cb482146938243caaf0027f..2b32b92d3faea1e47aa76707165ba69f1d67043c 100644 (file)
@@ -100,7 +100,7 @@ class TimeoutTestCase(unittest.TestCase):
 
     def setUp(self):
         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-        self.addr_remote = ('www.python.org', 80)
+        self.addr_remote = ('www.python.org.', 80)
         self.addr_local  = ('127.0.0.1', 25339)
 
     def tearDown(self):
index dc3d36d753c43db809e96aa24765ed66d6cf9685..8b13096c2b9504ed72ab252ab45c0c00fb16e295 100644 (file)
@@ -123,7 +123,7 @@ class urlopenNetworkTests(unittest.TestCase):
                           # domain will be spared to serve its defined
                           # purpose.
                           # urllib2.urlopen, "http://www.sadflkjsasadf.com/")
-                          urllib2.urlopen, "http://www.python.invalid/")
+                          urllib2.urlopen, "http://www.python.invalid./")
 
 
 class OtherNetworkTests(unittest.TestCase):
index 80761df0fc9c8ef1ee4683153fa4fa88e6462339..9105afe42af96f4b57581742c91994220dce44a7 100644 (file)
@@ -110,7 +110,7 @@ class urlopenNetworkTests(unittest.TestCase):
                           # domain will be spared to serve its defined
                           # purpose.
                           # urllib.urlopen, "http://www.sadflkjsasadf.com/")
-                          urllib.urlopen, "http://www.python.invalid/")
+                          urllib.urlopen, "http://www.python.invalid./")
 
 class urlretrieveNetworkTests(unittest.TestCase):
     """Tests urllib.urlretrieve using the network."""