Merge "Replace assertRaisesRegexp with assertRaisesRegex"

This commit is contained in:
Zuul 2018-04-24 03:22:55 +00:00 committed by Gerrit Code Review
commit a6da53c8dd
2 changed files with 4 additions and 4 deletions

View File

@ -71,7 +71,7 @@ class TestDefaultEngine(base.DbTestCase):
self.orchestrator.delete_pool.assert_called_once_with(
runtime_id)
self.assertRaisesRegexp(
self.assertRaisesRegex(
exc.DBEntityNotFoundError,
"^Runtime not found \[id=%s\]$" % runtime_id,
db_api.get_runtime, runtime_id)

View File

@ -72,7 +72,7 @@ class TestFileSystemStorage(base.BaseTest):
function_data = "Some data".encode('utf8')
not_a_md5sum = "Not a md5sum"
self.assertRaisesRegexp(
self.assertRaisesRegex(
exc.InputException,
"^Package md5 mismatch\.$",
self.storage.store,
@ -96,7 +96,7 @@ class TestFileSystemStorage(base.BaseTest):
# For python3, data should be encoded into bytes before hashing.
function_data = "Some data".encode('utf8')
self.assertRaisesRegexp(
self.assertRaisesRegex(
exc.InputException,
"^Package is not a valid ZIP package\.$",
self.storage.store,
@ -133,7 +133,7 @@ class TestFileSystemStorage(base.BaseTest):
exists_mock.return_value = False
function = self.rand_name('function', prefix='TestFileSystemStorage')
self.assertRaisesRegexp(
self.assertRaisesRegex(
exc.StorageNotFoundException,
"^Package of function %s for project %s not found\.$" % (
function, self.project_id),