Use assertRegex instead of assertRegexpMatches
In Python3, assertRegexpMatches & assertNotRegexpMatches are deprecated in favor of assertRegex and assertNotRegex Change-Id: I85c539cef94ca4bfbf76229aadb8bf05eee4eaee
This commit is contained in:
parent
2dc94f51eb
commit
4f215e9727
@ -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[^"]*"')
|
||||
|
Loading…
x
Reference in New Issue
Block a user