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
This commit is contained in:
Luong Anh Tuan 2017-05-19 20:15:20 +07:00
parent 15878b7b18
commit efe739f039

@ -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={})