@@ -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 :
@@ -475,6 +477,7 @@ def test_cafile_and_context(self):
475
477
"https://localhost" , cafile = "/nonexistent/path" , context = context
476
478
)
477
479
480
+
478
481
class urlopen_DataTests (unittest .TestCase ):
479
482
"""Test urlopen() opening a data URL."""
480
483
@@ -548,6 +551,7 @@ def test_invalid_base64_data(self):
548
551
# missing padding character
549
552
self .assertRaises (ValueError ,urllib .request .urlopen ,'data:;base64,Cg=' )
550
553
554
+
551
555
class urlretrieve_FileTests (unittest .TestCase ):
552
556
"""Test urllib.urlretrieve() on local files"""
553
557
0 commit comments