From: Corey Bryant Date: Mon, 5 Jan 2015 19:53:48 +0000 (-0500) Subject: Use assertRaisesRegexp() in test_srb.py. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=4478224d1d97e8936af3f679f65b791ee6375f46;p=openstack-build%2Fcinder-build.git Use assertRaisesRegexp() in test_srb.py. Python >= 2.7 should be using assertRaisesRegexp() rather than assertRaisesRegex(). Change-Id: I033b88d50cf90503e1123a9871c1bc252d914c06 Closes-Bug: 1407781 --- diff --git a/cinder/tests/test_srb.py b/cinder/tests/test_srb.py index 91783fa51..b084c2680 100644 --- a/cinder/tests/test_srb.py +++ b/cinder/tests/test_srb.py @@ -211,7 +211,8 @@ class TestHandleProcessExecutionError(test.TestCase): message='', info_message='', reraise=True): raise processutils.ProcessExecutionError(description='Oops') - self.assertRaisesRegex(processutils.ProcessExecutionError, r'^Oops', f) + self.assertRaisesRegexp(processutils.ProcessExecutionError, + r'^Oops', f) def test_reraise_false(self): with srb.handle_process_execution_error( @@ -224,7 +225,7 @@ class TestHandleProcessExecutionError(test.TestCase): message='', info_message='', reraise=RuntimeError('Oops')): raise processutils.ProcessExecutionError - self.assertRaisesRegex(RuntimeError, r'^Oops', f) + self.assertRaisesRegexp(RuntimeError, r'^Oops', f) class SRBDriverTestCase(test.TestCase):