Browse Source

Use assertRegex instead of assertRegexpMatches

In Python3, assertRegexpMatches & assertNotRegexpMatches
are deprecated in favor of assertRegex and assertNotRegex

Change-Id: I770e45ea04b799fa102887275acc95cdddbfd162
wangqi 11 months ago
parent
commit
df56338490
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      heat_dashboard/test/tests/content/test_stacks.py

+ 1
- 1
heat_dashboard/test/tests/content/test_stacks.py View File

@@ -445,7 +445,7 @@ class StackTests(test.TestCase):
445 445
         # ensure the fields were rendered in the correct order
446 446
         regex = re.compile('^.*>first_param<.*>middle_param<.*>last_param<.*$',
447 447
                            flags=re.DOTALL)
448
-        self.assertRegexpMatches(res.content.decode('utf-8'), regex)
448
+        self.assertRegex(res.content.decode('utf-8'), regex)
449 449
 
450 450
     @test.create_mocks({api.heat: ('stack_create', 'template_validate')})
451 451
     def test_launch_stack_parameter_types(self):

Loading…
Cancel
Save