From 21994297cf86600723d7db7339d110ede9574051 Mon Sep 17 00:00:00 2001 From: Luong Anh Tuan Date: Fri, 19 May 2017 18:02:35 +0700 Subject: [PATCH] Replace assertRaisesRegexp with assertRaisesRegex This replaces the deprecated (in python 3.2) unittest.TestCase method assertRaisesRegexp() with assertRaisesRegex(). Change-Id: I38c3055288034aba51c11bb1bccd3655f760cecc Closes-Bug: #1436957 --- watcher/tests/api/v1/test_audit_templates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/watcher/tests/api/v1/test_audit_templates.py b/watcher/tests/api/v1/test_audit_templates.py index 6ce6451ba..b3ac65885 100644 --- a/watcher/tests/api/v1/test_audit_templates.py +++ b/watcher/tests/api/v1/test_audit_templates.py @@ -529,8 +529,8 @@ class TestPost(FunctionalTestWithSetup): audit_template_dict = post_get_test_audit_template( goal=self.fake_goal1.uuid, strategy=self.fake_strategy1.uuid, scope=scope) - with self.assertRaisesRegexp(AppError, - "be included and excluded together"): + with self.assertRaisesRegex(AppError, + "be included and excluded together"): self.post_json('/audit_templates', audit_template_dict) def test_create_audit_template_does_autogenerate_id(self):