summaryrefslogtreecommitdiff
path: root/ironic_python_agent
diff options
context:
space:
mode:
authorLuong Anh Tuan <tuanla@vn.fujitsu.com>2017-05-19 20:15:20 +0700
committerLuong Anh Tuan <tuanla@vn.fujitsu.com>2017-05-19 20:16:47 +0700
commitefe739f039f4bcdbf79e29d0c5cbf4302f5fa8af (patch)
tree0cb4ccea5e016201573a49c7ce72404e12b7f3ee /ironic_python_agent
parent15878b7b181098db7abb6601ada0e245b6722d46 (diff)
downloadironic-python-agent-efe739f039f4bcdbf79e29d0c5cbf4302f5fa8af.tar.gz
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
Diffstat (limited to 'ironic_python_agent')
-rw-r--r--ironic_python_agent/tests/unit/extensions/test_standby.py4
1 files changed, 2 insertions, 2 deletions
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={})