Skip to content

Commit ca225ce

Browse files
committed
Add some more urllib tests under the install_aliases() assumption
This tests the modules ``urllib.requests`` etc.
1 parent ff6cf4e commit ca225ce

File tree

2 files changed

+1413
-1
lines changed

2 files changed

+1413
-1
lines changed

tests/test_future/test_standard_library.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def test_urllib_request_ssl_redirect(self):
332332
# pprint(r.read().decode('utf-8'))
333333
self.assertTrue(True)
334334

335-
def test_urllib_request_http(self):
335+
def test_moves_urllib_request_http(self):
336336
"""
337337
This site (python-future.org) uses plain http (as of 2014-09-23).
338338
"""
@@ -343,6 +343,17 @@ def test_urllib_request_http(self):
343343
data = r.read()
344344
self.assertTrue(b'</html>' in data)
345345

346+
def test_urllib_request_http(self):
347+
"""
348+
This site (python-future.org) uses plain http (as of 2014-09-23).
349+
"""
350+
import urllib.request as urllib_request
351+
from pprint import pprint
352+
URL = 'http://python-future.org'
353+
r = urllib_request.urlopen(URL)
354+
data = r.read()
355+
self.assertTrue(b'</html>' in data)
356+
346357
def test_html_import(self):
347358
import html
348359
import html.entities

0 commit comments

Comments
 (0)