Replace assertRaisesRegexp with assertRaisesRegex
This replaces the deprecated (in python 3.2) unittest.TestCase method assertRaisesRegexp() with assertRaisesRegex(). Change-Id: Iba92ef7a76d9392750a95e3bd603f364de4ec890 Signed-off-by: Chuck Short <chucks@redhat.com>
This commit is contained in:
parent
6d0aa06218
commit
7072a7552d
@ -4540,7 +4540,7 @@ class PortChoicesTestCase(BaseTestCase):
|
||||
self.assertRaises(SystemExit, self.conf, ['--port', '8181'])
|
||||
|
||||
def test_choice_out_range(self):
|
||||
self.assertRaisesRegexp(ValueError, 'out of bounds',
|
||||
self.assertRaisesRegex(ValueError, 'out of bounds',
|
||||
cfg.PortOpt, 'port', choices=[80, 65537, 0])
|
||||
|
||||
def test_conf_file_choice_value(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user