Commit 73a50725 authored by Ezio Melotti's avatar Ezio Melotti

Fix deprecation warning in test_binascii.

parent 9d196959
...@@ -26,10 +26,10 @@ class BinASCIITest(unittest.TestCase): ...@@ -26,10 +26,10 @@ class BinASCIITest(unittest.TestCase):
prefixes.extend(["crc_", "rlecode_", "rledecode_"]) prefixes.extend(["crc_", "rlecode_", "rledecode_"])
for prefix in prefixes: for prefix in prefixes:
name = prefix + suffix name = prefix + suffix
self.assert_(callable(getattr(binascii, name))) self.assertTrue(hasattr(getattr(binascii, name), '__call__'))
self.assertRaises(TypeError, getattr(binascii, name)) self.assertRaises(TypeError, getattr(binascii, name))
for name in ("hexlify", "unhexlify"): for name in ("hexlify", "unhexlify"):
self.assert_(callable(getattr(binascii, name))) self.assertTrue(hasattr(getattr(binascii, name), '__call__'))
self.assertRaises(TypeError, getattr(binascii, name)) self.assertRaises(TypeError, getattr(binascii, name))
def test_base64valid(self): def test_base64valid(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment