Browse Source

Replace assertRaisesRegexp with assertRaisesRegex

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

Change-Id: I3f25205c0fd0d47ed7d5d76c2f11dd91360f2a26
changes/23/469023/1
Van Hung Pham 4 years ago
parent
commit
6707af83c6
  1. 2
      openstack_dashboard/test/integration_tests/tests/test_images.py

2
openstack_dashboard/test/integration_tests/tests/test_images.py

@ -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.

Loading…
Cancel
Save