  
  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')
 
</s> remove var csrftoken = getCookie(window.drf.csrfCookieName);
 </s> add var csrftoken = window.drf.csrfToken;
    result = render({}, 'rest_framework/base.html')
    # note that this response will not include a valid CSRF token
    assert re.search(r'\bcsrfToken: ""', result.content.decode('utf-8'))
  
  def test_base_template_with_no_context():
      # base.html should be renderable with no context,
      # so it can be easily extended.
    result = render({}, 'rest_framework/base.html')
    # note that this response will not include a valid CSRF token
    assert re.search(r'\bcsrfToken: ""', result.content.decode('utf-8'))
keep keep keep keep replace
 Made templates compatible with session-based CSRF. (#6207) 
tests/test_templates.py