mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-30 18:09:59 +03:00
template includes csrfToken property in javascript
This commit is contained in:
parent
cee6823ec0
commit
9c23899017
|
@ -1,7 +1,11 @@
|
|||
import re
|
||||
|
||||
from django.shortcuts import render
|
||||
|
||||
|
||||
def test_base_template_with_no_context():
|
||||
# base.html should be renderable with no context,
|
||||
# so it can be easily extended.
|
||||
render({}, 'rest_framework/base.html')
|
||||
result = render({}, 'rest_framework/base.html')
|
||||
# note that this response will not include a valid CSRF token
|
||||
assert re.search(r'\bcsrfToken: ""', result.content)
|
||||
|
|
Loading…
Reference in New Issue
Block a user