From efe739f039f4bcdbf79e29d0c5cbf4302f5fa8af Mon Sep 17 00:00:00 2001 From: Luong Anh Tuan Date: Fri, 19 May 2017 20:15:20 +0700 Subject: Replace assertRaisesRegexp with assertRaisesRegex This replaces the deprecated (in python 3.2) unittest.TestCase method assertRaisesRegexp() with assertRaisesRegex()[1]. [1]https://review.openstack.org/#/c/466155/ Change-Id: Ife8504dbb58019a30bcc1495a78ab14c757efc98 Related-Bug: 1673768 --- ironic_python_agent/tests/unit/extensions/test_standby.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ironic_python_agent') diff --git a/ironic_python_agent/tests/unit/extensions/test_standby.py b/ironic_python_agent/tests/unit/extensions/test_standby.py index 7495d610..8b404e96 100644 --- a/ironic_python_agent/tests/unit/extensions/test_standby.py +++ b/ironic_python_agent/tests/unit/extensions/test_standby.py @@ -904,8 +904,8 @@ class TestImageDownload(test_base.BaseTestCase): 'URL: http://example.org; time: 0.0 seconds. Error: ' 'Received status code 401 from http://example.org, expected ' '200. Response body: Unauthorized') - self.assertRaisesRegexp(errors.ImageDownloadError, msg, - standby.ImageDownload, image_info) + self.assertRaisesRegex(errors.ImageDownloadError, msg, + standby.ImageDownload, image_info) requests_mock.assert_called_once_with(image_info['urls'][0], cert=None, verify=True, stream=True, proxies={}) -- cgit v1.2.1