diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-08-08 16:16:07 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-08-08 16:16:07 (GMT) |
commit | 419e384601c6af03feddace9c0254e7f3920b141 (patch) | |
tree | 188283fdd726f6559125812b4c55bb29d15120ea /Lib/test/test_urllib.py | |
parent | 1f594ad424311fc3fb558a9ddfb126c5c9a0287e (diff) | |
download | cpython-419e384601c6af03feddace9c0254e7f3920b141.zip cpython-419e384601c6af03feddace9c0254e7f3920b141.tar.gz cpython-419e384601c6af03feddace9c0254e7f3920b141.tar.bz2 |
Use unittest specific methods for some urllib test cases. And replace urllib2 with urllib.request in comments.
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r-- | Lib/test/test_urllib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 2a9102c..159fd8a 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -102,7 +102,7 @@ class urlopen_FileTests(unittest.TestCase): self.assertEqual(self.returned_obj.geturl(), self.pathname) def test_getcode(self): - self.assertEqual(self.returned_obj.getcode(), None) + self.assertIsNone(self.returned_obj.getcode()) def test_iter(self): # Test iterator @@ -131,7 +131,7 @@ class ProxyTests(unittest.TestCase): self.env.set('NO_PROXY', 'localhost') proxies = urllib.request.getproxies_environment() # getproxies_environment use lowered case truncated (no '_proxy') keys - self.assertEquals('localhost', proxies['no']) + self.assertEqual('localhost', proxies['no']) class urlopen_HttpTests(unittest.TestCase): |