Merge "Replace assertRaisesRegexp with assertRaisesRegex"

This commit is contained in:
Zuul 2018-11-10 10:16:39 +00:00 committed by Gerrit Code Review
commit bfcda5000e
2 changed files with 10 additions and 10 deletions
cinderclient/tests/unit

@ -236,12 +236,12 @@ class DiscoverVersionTestCase(utils.TestCase):
api_versions.MIN_VERSION = client_min
if exp_range:
self.assertRaisesRegexp(exceptions.UnsupportedVersion,
".*range is '%s' to '%s'.*" %
(server_min, server_max),
api_versions.discover_version,
self.fake_client,
api_versions.APIVersion(requested_version))
self.assertRaisesRegex(exceptions.UnsupportedVersion,
".*range is '%s' to '%s'.*" %
(server_min, server_max),
api_versions.discover_version,
self.fake_client,
api_versions.APIVersion(requested_version))
else:
discovered_version = api_versions.discover_version(
self.fake_client,

@ -529,10 +529,10 @@ class ShellTest(utils.TestCase):
def test_rename_invalid_args(self):
"""Ensure that error generated does not reference an HTTP code."""
self.assertRaisesRegexp(exceptions.ClientException,
'(?!HTTP)',
self.run_command,
'rename volume-1234-abcd')
self.assertRaisesRegex(exceptions.ClientException,
'(?!HTTP)',
self.run_command,
'rename volume-1234-abcd')
def test_rename_snapshot(self):
# basic rename with positional arguments