Replace assertRaisesRegexp with assertRaisesRegex

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

Change-Id: I3f25205c0fd0d47ed7d5d76c2f11dd91360f2a26
This commit is contained in:
Van Hung Pham 2017-05-31 01:17:08 +07:00
parent 9d74df8501
commit 6707af83c6
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ class TestImagesBasic(TestImagesLegacy):
# Check that Delete action is not available in the action list.
# The below action will generate exception since the bind fails.
# But only ValueError with message below is expected here.
with self.assertRaisesRegexp(ValueError, 'Could not bind method'):
with self.assertRaisesRegex(ValueError, 'Could not bind method'):
images_page.delete_image_via_row_action(self.IMAGE_NAME)
# Try to delete image. That should not be possible now.