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