Replace assertRaisesRegexp with assertRaisesRegex

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

Change-Id: Ic1aad86680f4b2d6b4e694f8427c6c21c2393590
Signed-off-by: Chuck Short <chucks@redhat.com>
This commit is contained in:
Chuck Short 2018-08-27 11:09:28 -04:00
parent 444679037e
commit 9391cbf297
2 changed files with 2 additions and 2 deletions

View File

@ -174,6 +174,6 @@ class DaemonTest(base.BaseTestCase):
class WithContextTest(testctx.TestContextTestCase):
def test_unexported(self):
self.assertRaisesRegexp(
self.assertRaisesRegex(
NameError, 'undecorated not exported',
testctx.context._wrap, undecorated)

View File

@ -186,7 +186,7 @@ class SerializationTest(testctx.TestContextTestCase):
self.assertEqual(43, add1(42))
def test_raises_standard(self):
self.assertRaisesRegexp(
self.assertRaisesRegex(
RuntimeError, "I can't let you do that Dave", fail)
def test_raises_custom(self):