Replace assertRaisesRegexp with assertRaisesRegex
This replaces the deprecated (in python 3.2) unittest.TestCase method assertRaisesRegexp() with assertRaisesRegex(). Change-Id: I5a2c42765ee0ce660c40ac43a078943125746c71 Signed-off-by: Chuck Short <chucks@redhat.com>
This commit is contained in:
parent
d42343deea
commit
c8235723f9
@ -1629,9 +1629,9 @@ class PXERamdiskDeployTestCase(db_base.DbTestCase):
|
||||
self.config(enabled_boot_interfaces=['fake'],
|
||||
default_boot_interface='fake')
|
||||
with task_manager.acquire(self.context, node.uuid) as task:
|
||||
self.assertRaisesRegexp(exception.InvalidParameterValue,
|
||||
'must have the `ramdisk_boot` capability',
|
||||
task.driver.deploy.validate, task)
|
||||
self.assertRaisesRegex(exception.InvalidParameterValue,
|
||||
'must have the `ramdisk_boot` capability',
|
||||
task.driver.deploy.validate, task)
|
||||
self.assertFalse(mock_validate_image.called)
|
||||
|
||||
@mock.patch.object(pxe.PXEBoot, 'validate', autospec=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user