diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-06-30 22:57:08 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-06-30 22:57:08 +0000 |
commit | 5c8da86f3a515ce1a6d5f27fd15e3c5f4d8e931e (patch) | |
tree | 41f38aca16748628d53906337f06fdf087f52314 /Lib/test/test_urllib2net.py | |
parent | be96cf608fa656d7e53144cf85082ed5661e8c13 (diff) | |
download | cpython-git-5c8da86f3a515ce1a6d5f27fd15e3c5f4d8e931e.tar.gz |
convert usage of fail* to assert*
Diffstat (limited to 'Lib/test/test_urllib2net.py')
-rw-r--r-- | Lib/test/test_urllib2net.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py index b4e6ae5e77..97886759a2 100644 --- a/Lib/test/test_urllib2net.py +++ b/Lib/test/test_urllib2net.py @@ -81,15 +81,15 @@ class CloseSocketTest(unittest.TestCase): # delve deep into response to fetch socket._socketobject response = _urlopen_with_retry("http://www.python.org/") abused_fileobject = response.fp - self.assert_(abused_fileobject.__class__ is socket._fileobject) + self.assertTrue(abused_fileobject.__class__ is socket._fileobject) httpresponse = abused_fileobject._sock - self.assert_(httpresponse.__class__ is httplib.HTTPResponse) + self.assertTrue(httpresponse.__class__ is httplib.HTTPResponse) fileobject = httpresponse.fp - self.assert_(fileobject.__class__ is socket._fileobject) + self.assertTrue(fileobject.__class__ is socket._fileobject) - self.assert_(not fileobject.closed) + self.assertTrue(not fileobject.closed) response.close() - self.assert_(fileobject.closed) + self.assertTrue(fileobject.closed) class OtherNetworkTests(unittest.TestCase): def setUp(self): @@ -176,7 +176,7 @@ class OtherNetworkTests(unittest.TestCase): if expected_err: msg = ("Didn't get expected error(s) %s for %s %s, got %s: %s" % (expected_err, url, req, type(err), err)) - self.assert_(isinstance(err, expected_err), msg) + self.assertTrue(isinstance(err, expected_err), msg) else: with test_support.transient_internet(): buf = f.read() |