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:
Chuck Short 2018-08-27 09:47:55 -04:00
parent 6d0aa06218
commit 7072a7552d
1 changed files with 2 additions and 2 deletions

View File

@ -4540,8 +4540,8 @@ class PortChoicesTestCase(BaseTestCase):
self.assertRaises(SystemExit, self.conf, ['--port', '8181'])
def test_choice_out_range(self):
self.assertRaisesRegexp(ValueError, 'out of bounds',
cfg.PortOpt, 'port', choices=[80, 65537, 0])
self.assertRaisesRegex(ValueError, 'out of bounds',
cfg.PortOpt, 'port', choices=[80, 65537, 0])
def test_conf_file_choice_value(self):
self.conf.register_opt(cfg.PortOpt('port',