@@ -206,6 +206,7 @@ def test_iter(self):
206
206
def test_relativelocalfile (self ):
207
207
self .assertRaises (ValueError ,urllib .request .urlopen ,'./' + self .pathname )
208
208
209
+
209
210
class ProxyTests (unittest .TestCase ):
210
211
211
212
def setUp (self ):
@@ -259,6 +260,7 @@ def test_proxy_bypass_environment_host_match(self):
259
260
self .assertFalse (bypass ('newdomain.com' )) # no port
260
261
self .assertFalse (bypass ('newdomain.com:1235' )) # wrong port
261
262
263
+
262
264
class ProxyTests_withOrderedEnv (unittest .TestCase ):
263
265
264
266
def setUp (self ):
@@ -294,6 +296,7 @@ def test_getproxies_environment_prefer_lowercase(self):
294
296
proxies = urllib .request .getproxies_environment ()
295
297
self .assertEqual ('http://somewhere:3128' , proxies ['http' ])
296
298
299
+
297
300
class urlopen_HttpTests (unittest .TestCase , FakeHTTPMixin , FakeFTPMixin ):
298
301
"""Test urlopen() opening a fake http connection."""
299
302
@@ -432,7 +435,6 @@ def test_ftp_cache_pruning(self):
432
435
finally :
433
436
self .unfakeftp ()
434
437
435
-
436
438
def test_userpass_inurl (self ):
437
439
self .fakehttp (b"HTTP/1.0 200 OK\r \n \r \n Hello!" )
438
440
try :
@@ -476,6 +478,7 @@ def test_cafile_and_context(self):
476
478
"https://localhost" , cafile = "/nonexistent/path" , context = context
477
479
)
478
480
481
+
479
482
class urlopen_DataTests (unittest .TestCase ):
480
483
"""Test urlopen() opening a data URL."""
481
484
@@ -549,6 +552,7 @@ def test_invalid_base64_data(self):
549
552
# missing padding character
550
553
self .assertRaises (ValueError ,urllib .request .urlopen ,'data:;base64,Cg=' )
551
554
555
+
552
556
class urlretrieve_FileTests (unittest .TestCase ):
553
557
"""Test urllib.urlretrieve() on local files"""
554
558
0 commit comments