File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import urllib .request
99import sys
1010
11- try :
12- import ssl
13- except ImportError :
14- ssl = None
15-
16- requires_ssl = unittest .skipIf (ssl is None , "SSL not supported" )
17-
1811support .requires ("network" )
1912
2013TIMEOUT = 60 # seconds
@@ -167,14 +160,13 @@ def test_urlwithfrag(self):
167160 self .assertEqual (res .geturl (),
168161 "http://www.pythontest.net/index.html#frag" )
169162
170- @requires_ssl
171163 def test_redirect_url_withfrag (self ):
172- redirect_url_with_frag = "http://bit.ly/1iSHToT "
164+ redirect_url_with_frag = "http://www.pythontest.net/redir/with_frag/ "
173165 with support .transient_internet (redirect_url_with_frag ):
174166 req = urllib .request .Request (redirect_url_with_frag )
175167 res = urllib .request .urlopen (req )
176168 self .assertEqual (res .geturl (),
177- "https ://docs.python.org/3.4/glossary.html#term-global-interpreter-lock " )
169+ "http ://www.pythontest.net/elsewhere/#frag " )
178170
179171 def test_custom_headers (self ):
180172 url = "http://www.example.com"
You can’t perform that action at this time.
0 commit comments