Browse Source

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>
Chuck Short 7 months ago
parent
commit
9391cbf297
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      oslo_privsep/tests/test_daemon.py
  2. 1
    1
      oslo_privsep/tests/test_priv_context.py

+ 1
- 1
oslo_privsep/tests/test_daemon.py View File

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

+ 1
- 1
oslo_privsep/tests/test_priv_context.py View File

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

Loading…
Cancel
Save