Use assertRegex instead of assertRegexpMatches
In Python3, assertRegexpMatches & assertNotRegexpMatches are deprecated in favor of assertRegex and assertNotRegex Change-Id: If08a6f163bed2dde5ac56416a50754f4a8d38b2e
This commit is contained in:
parent
4e411761bf
commit
57082cccba
|
@ -32,7 +32,7 @@ class NagiosTestCase(unittest.TestCase):
|
|||
mock_subprocess.return_value = tree.encode('UTF-8')
|
||||
args = check_ceph_status.parse_args(['--degraded_thresh', '1'])
|
||||
check_output = check_ceph_status.check_ceph_status(args)
|
||||
self.assertRegexpMatches(check_output, r"^All OK$")
|
||||
self.assertRegex(check_output, r"^All OK$")
|
||||
|
||||
def test_health_warn(self, mock_subprocess):
|
||||
with open('unit_tests/ceph_warn.json') as f:
|
||||
|
|
Loading…
Reference in New Issue