Merge "Use assertRegex instead of assertRegexpMatches"

This commit is contained in:
Zuul 2017-12-22 07:22:20 +00:00 committed by Gerrit Code Review
commit 518986711a

View File

@ -306,8 +306,8 @@ class WorkflowsTests(test.TestCase):
req.is_ajax = lambda: True
res = view(req)
output = res.render()
self.assertRegexpMatches(str(output),
'class="[^"]*\\bfullscreen\\b[^"]*"')
self.assertRegex(str(output),
'class="[^"]*\\bfullscreen\\b[^"]*"')
def test_notfullscreenworkflow_view(self):
view = TestWorkflowView.as_view()
@ -315,5 +315,5 @@ class WorkflowsTests(test.TestCase):
req.is_ajax = lambda: True
res = view(req)
output = res.render()
self.assertNotRegexpMatches(str(output),
'class="[^"]*\\bfullscreen\\b[^"]*"')
self.assertNotRegex(str(output),
'class="[^"]*\\bfullscreen\\b[^"]*"')