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:
Nguyen Hung Phuong 2018-01-02 14:04:11 +07:00
parent 4e411761bf
commit 57082cccba
1 changed files with 1 additions and 1 deletions

View File

@ -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: