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:
@@ -529,8 +529,8 @@ class TestPost(FunctionalTestWithSetup):
|
|||||||
audit_template_dict = post_get_test_audit_template(
|
audit_template_dict = post_get_test_audit_template(
|
||||||
goal=self.fake_goal1.uuid,
|
goal=self.fake_goal1.uuid,
|
||||||
strategy=self.fake_strategy1.uuid, scope=scope)
|
strategy=self.fake_strategy1.uuid, scope=scope)
|
||||||
with self.assertRaisesRegexp(AppError,
|
with self.assertRaisesRegex(AppError,
|
||||||
"be included and excluded together"):
|
"be included and excluded together"):
|
||||||
self.post_json('/audit_templates', audit_template_dict)
|
self.post_json('/audit_templates', audit_template_dict)
|
||||||
|
|
||||||
def test_create_audit_template_does_autogenerate_id(self):
|
def test_create_audit_template_does_autogenerate_id(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user