From df563384901294ac118c45a1e92734f67b6593d8 Mon Sep 17 00:00:00 2001 From: wangqi Date: Thu, 17 May 2018 08:28:21 +0000 Subject: [PATCH] Use assertRegex instead of assertRegexpMatches In Python3, assertRegexpMatches & assertNotRegexpMatches are deprecated in favor of assertRegex and assertNotRegex Change-Id: I770e45ea04b799fa102887275acc95cdddbfd162 --- heat_dashboard/test/tests/content/test_stacks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heat_dashboard/test/tests/content/test_stacks.py b/heat_dashboard/test/tests/content/test_stacks.py index 27c1642d..4a0401bc 100644 --- a/heat_dashboard/test/tests/content/test_stacks.py +++ b/heat_dashboard/test/tests/content/test_stacks.py @@ -445,7 +445,7 @@ class StackTests(test.TestCase): # ensure the fields were rendered in the correct order regex = re.compile('^.*>first_param<.*>middle_param<.*>last_param<.*$', flags=re.DOTALL) - self.assertRegexpMatches(res.content.decode('utf-8'), regex) + self.assertRegex(res.content.decode('utf-8'), regex) @test.create_mocks({api.heat: ('stack_create', 'template_validate')}) def test_launch_stack_parameter_types(self):