Use assertRaisesRegex instead of deprecated assertRaisesRegexp.

This commit is contained in:
Serhiy Storchaka 2015-04-10 12:52:09 +03:00
parent 057b530024
commit 93da9b5e57
1 changed files with 2 additions and 2 deletions

View File

@ -891,8 +891,8 @@ class GzipUtilTestCase(unittest.TestCase):
data = b'\0' * (max_gzip_decode + 1)
encoded = xmlrpclib.gzip_encode(data)
with self.assertRaisesRegexp(ValueError,
"max gzipped payload length exceeded"):
with self.assertRaisesRegex(ValueError,
"max gzipped payload length exceeded"):
xmlrpclib.gzip_decode(encoded)
xmlrpclib.gzip_decode(encoded, max_decode=-1)