convert old fail* assertions to assert*

This commit is contained in:
Benjamin Peterson 2009-06-30 23:06:06 +00:00
parent 98d23f2e06
commit c9c0f201fe
275 changed files with 4540 additions and 4540 deletions

View file

@ -14,8 +14,8 @@ class BinASCIITest(unittest.TestCase):
def test_exceptions(self):
# Check module exceptions
self.assert_(issubclass(binascii.Error, Exception))
self.assert_(issubclass(binascii.Incomplete, Exception))
self.assertTrue(issubclass(binascii.Error, Exception))
self.assertTrue(issubclass(binascii.Incomplete, Exception))
def test_functions(self):
# Check presence of all functions
@ -26,10 +26,10 @@ class BinASCIITest(unittest.TestCase):
prefixes.extend(["crc_", "rlecode_", "rledecode_"])
for prefix in prefixes:
name = prefix + suffix
self.assert_(hasattr(getattr(binascii, name), '__call__'))
self.assertTrue(hasattr(getattr(binascii, name), '__call__'))
self.assertRaises(TypeError, getattr(binascii, name))
for name in ("hexlify", "unhexlify"):
self.assert_(hasattr(getattr(binascii, name), '__call__'))
self.assertTrue(hasattr(getattr(binascii, name), '__call__'))
self.assertRaises(TypeError, getattr(binascii, name))
def test_base64valid(self):