Replace assertRaisesRegexp with assertRaisesRegex

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

Change-Id: I0ac482741ad4adc1127dd9e9f64c1c8101f370e5
Signed-off-by: Chuck Short <chucks@redhat.com>
This commit is contained in:
Chuck Short 2018-08-27 10:39:59 -04:00
parent b602c05551
commit b67cfc6950

View File

@ -174,7 +174,7 @@ class TestElementDeps(testtools.TestCase):
def test_elements_provide_same(self): def test_elements_provide_same(self):
msg = "virtual: already provided by \['provides_virtual'\]" msg = "virtual: already provided by \['provides_virtual'\]"
self.assertRaisesRegexp(element_dependencies.AlreadyProvidedException, self.assertRaisesRegex(element_dependencies.AlreadyProvidedException,
msg, msg,
element_dependencies.get_elements, element_dependencies.get_elements,
['provides_virtual', 'also_provides_virtual'], ['provides_virtual', 'also_provides_virtual'],