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:
parent
b602c05551
commit
b67cfc6950
@ -174,11 +174,11 @@ class TestElementDeps(testtools.TestCase):
|
||||
|
||||
def test_elements_provide_same(self):
|
||||
msg = "virtual: already provided by \['provides_virtual'\]"
|
||||
self.assertRaisesRegexp(element_dependencies.AlreadyProvidedException,
|
||||
msg,
|
||||
element_dependencies.get_elements,
|
||||
['provides_virtual', 'also_provides_virtual'],
|
||||
self.element_dirs)
|
||||
self.assertRaisesRegex(element_dependencies.AlreadyProvidedException,
|
||||
msg,
|
||||
element_dependencies.get_elements,
|
||||
['provides_virtual', 'also_provides_virtual'],
|
||||
self.element_dirs)
|
||||
|
||||
def test_no_os_element(self):
|
||||
self.assertRaises(element_dependencies.MissingOSException,
|
||||
|
Loading…
Reference in New Issue
Block a user