Browse Source

Merge "Replace assertRaisesRegexp with assertRaisesRegex"

changes/26/563826/1
Zuul 3 years ago
committed by Gerrit Code Review
parent
commit
a6da53c8dd
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      qinling/tests/unit/engine/test_default_engine.py
  2. +3
    -3
      qinling/tests/unit/storage/test_file_system.py

+ 1
- 1
qinling/tests/unit/engine/test_default_engine.py 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)


+ 3
- 3
qinling/tests/unit/storage/test_file_system.py 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),


Loading…
Cancel
Save