summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-02-20 04:06:24 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-02-20 04:06:24 (GMT)
commita96fd48298db04cedbdb0cb75fc124ba58ff7bb4 (patch)
tree333b3ff2ae8d3721a172fc838defe81b33b4a211 /Lib
parent665a2bcdf800c1232f5addd051d358ffb3023da1 (diff)
parent1b94030b370db589286c731c708ab7742a918055 (diff)
downloadcpython-a96fd48298db04cedbdb0cb75fc124ba58ff7bb4.zip
cpython-a96fd48298db04cedbdb0cb75fc124ba58ff7bb4.tar.gz
cpython-a96fd48298db04cedbdb0cb75fc124ba58ff7bb4.tar.bz2
merge 3.2 (#20695)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_urllibnet.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
index 4e0b7bd..38afb69 100644
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -103,7 +103,7 @@ class urlopenNetworkTests(unittest.TestCase):
# Make sure fd returned by fileno is valid.
with self.urlopen("http://www.python.org/", timeout=None) as open_url:
fd = open_url.fileno()
- with os.fdopen(fd, encoding='utf-8') as f:
+ with os.fdopen(fd, 'rb') as f:
self.assertTrue(f.read(), "reading from file created using fd "
"returned by fileno failed")
@@ -151,7 +151,7 @@ class urlretrieveNetworkTests(unittest.TestCase):
with self.urlretrieve("http://www.python.org/") as (file_location, info):
self.assertTrue(os.path.exists(file_location), "file location returned by"
" urlretrieve is not a valid path")
- with open(file_location, encoding='utf-8') as f:
+ with open(file_location, 'rb') as f:
self.assertTrue(f.read(), "reading from the file location returned"
" by urlretrieve failed")
@@ -161,7 +161,7 @@ class urlretrieveNetworkTests(unittest.TestCase):
support.TESTFN) as (file_location, info):
self.assertEqual(file_location, support.TESTFN)
self.assertTrue(os.path.exists(file_location))
- with open(file_location, encoding='utf-8') as f:
+ with open(file_location, 'rb') as f:
self.assertTrue(f.read(), "reading from temporary file failed")
def test_header(self):
@@ -170,7 +170,7 @@ class urlretrieveNetworkTests(unittest.TestCase):
self.assertIsInstance(info, email.message.Message,
"info is not an instance of email.message.Message")
- logo = "http://www.python.org/community/logos/python-logo-master-v3-TM.png"
+ logo = "http://www.python.org/static/community_logos/python-logo-master-v3-TM.png"
def test_data_header(self):
with self.urlretrieve(self.logo) as (file_location, fileheaders):