]> granicus.if.org Git - python/commitdiff
use pythontest.net for fragment redirection test
authorBenjamin Peterson <benjamin@python.org>
Wed, 5 Nov 2014 18:10:08 +0000 (13:10 -0500)
committerBenjamin Peterson <benjamin@python.org>
Wed, 5 Nov 2014 18:10:08 +0000 (13:10 -0500)
Lib/test/test_urllib2net.py

index 2b65e8fad337174d7f24f2a0d818687bb9a13c60..fc2140809ed55ac18efdfef929d5de6a5d9bf07b 100644 (file)
@@ -8,13 +8,6 @@ import urllib.error
 import urllib.request
 import sys
 
-try:
-    import ssl
-except ImportError:
-    ssl = None
-
-requires_ssl = unittest.skipIf(ssl is None, "SSL not supported")
-
 support.requires("network")
 
 TIMEOUT = 60  # seconds
@@ -167,14 +160,13 @@ class OtherNetworkTests(unittest.TestCase):
             self.assertEqual(res.geturl(),
                     "http://www.pythontest.net/index.html#frag")
 
-    @requires_ssl
     def test_redirect_url_withfrag(self):
-        redirect_url_with_frag = "http://bit.ly/1iSHToT"
+        redirect_url_with_frag = "http://www.pythontest.net/redir/with_frag/"
         with support.transient_internet(redirect_url_with_frag):
             req = urllib.request.Request(redirect_url_with_frag)
             res = urllib.request.urlopen(req)
             self.assertEqual(res.geturl(),
-                    "https://docs.python.org/3.4/glossary.html#term-global-interpreter-lock")
+                    "http://www.pythontest.net/elsewhere/#frag")
 
     def test_custom_headers(self):
         url = "http://www.example.com"