]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport Tim's fix to SF #809915.
authorRaymond Hettinger <python@rcn.com>
Sun, 21 Sep 2003 04:38:33 +0000 (04:38 +0000)
committerRaymond Hettinger <python@rcn.com>
Sun, 21 Sep 2003 04:38:33 +0000 (04:38 +0000)
Creates a url that should always be invalid.

Lib/test/test_urllibnet.py

index 0786e0665c3155e98c133b3d58395085bf9fec10..80761df0fc9c8ef1ee4683153fa4fa88e6462339 100644 (file)
@@ -103,7 +103,14 @@ class urlopenNetworkTests(unittest.TestCase):
         # Make sure proper exception is raised when connecting to a bogus
         # address.
         self.assertRaises(IOError,
-                          urllib.urlopen, "http://www.sadflkjsasadf.com/")
+                          # SF patch 809915:  In Sep 2003, VeriSign started
+                          # highjacking invalid .com and .net addresses to
+                          # boost traffic to their own site.  This test
+                          # started failing then.  One hopes the .invalid
+                          # domain will be spared to serve its defined
+                          # purpose.
+                          # urllib.urlopen, "http://www.sadflkjsasadf.com/")
+                          urllib.urlopen, "http://www.python.invalid/")
 
 class urlretrieveNetworkTests(unittest.TestCase):
     """Tests urllib.urlretrieve using the network."""