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:
parent
444679037e
commit
9391cbf297
@ -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)
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user