Replace assertRaisesRegexp with assertRaisesRegex

This replaces the deprecated (in python 3.2) unittest.TestCase
method assertRaisesRegexp() with assertRaisesRegex().

Change-Id: I38c3055288034aba51c11bb1bccd3655f760cecc
Closes-Bug: #1436957
This commit is contained in:
Luong Anh Tuan 2017-05-19 18:02:35 +07:00
parent 8a818c9071
commit 21994297cf
1 changed files with 2 additions and 2 deletions

View File

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