mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #30116 -- Simplified regex match group access with Match.__getitem__().
The method has been available since Python 3.6. The shorter syntax is also marginally faster.
This commit is contained in:
parent
23f6fbdd93
commit
d6aff369ad
36 changed files with 92 additions and 92 deletions
|
@ -64,7 +64,7 @@ class CsrfViewMiddlewareTestMixin:
|
|||
match = re.search('name="csrfmiddlewaretoken" value="(.*?)"', text)
|
||||
csrf_token = csrf_id or self._csrf_id
|
||||
self.assertTrue(
|
||||
match and equivalent_tokens(csrf_token, match.group(1)),
|
||||
match and equivalent_tokens(csrf_token, match[1]),
|
||||
"Could not find csrfmiddlewaretoken to match %s" % csrf_token
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue