Replace assertRaisesRegexp with assertRaisesRegex

This replaces the deprecated (in python 3.2) unittest.TestCase
method assertRaisesRegexp() with assertRaisesRegex().

Change-Id: Ic04e7406610a3b3f1232bc08c0b1ce94adb06827
Closes-Bug: #1436957
This commit is contained in:
Luong Anh Tuan 2017-05-19 18:12:55 +07:00 committed by Tuan Luong-Anh
parent f62bf9a7ce
commit ad54b62ef8
1 changed files with 3 additions and 3 deletions

View File

@ -67,9 +67,9 @@ class VimTestCreate(base.BaseTackerTest):
# to is_default to TRUE for another VIM raises an exception.
update_arg = {'vim': {'is_default': True}}
msg = "Default VIM already exists."
self.assertRaisesRegexp(exceptions.InternalServerError, msg,
self.client.update_vim,
vim_id, update_arg)
self.assertRaisesRegex(exceptions.InternalServerError, msg,
self.client.update_vim,
vim_id, update_arg)
# Delete vim
try: