diff --git a/tests/test_templates.py b/tests/test_templates.py index a296395f6..70c933d27 100644 --- a/tests/test_templates.py +++ b/tests/test_templates.py @@ -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)