From c8235723f9bc3c4120d039cd586da8d0f3bb72c0 Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Mon, 27 Aug 2018 10:35:05 -0400 Subject: [PATCH] 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 --- ironic/tests/unit/drivers/modules/test_pxe.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ironic/tests/unit/drivers/modules/test_pxe.py b/ironic/tests/unit/drivers/modules/test_pxe.py index d24149de91..d8a1b2d465 100644 --- a/ironic/tests/unit/drivers/modules/test_pxe.py +++ b/ironic/tests/unit/drivers/modules/test_pxe.py @@ -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)