Author: lukeplant
Date: 2011-03-30 10:35:50 -0700 (Wed, 30 Mar 2011)
New Revision: 15957

Modified:
   django/trunk/tests/regressiontests/csrf_tests/tests.py
Log:
Cleaned up some test code.

Modified: django/trunk/tests/regressiontests/csrf_tests/tests.py
===================================================================
--- django/trunk/tests/regressiontests/csrf_tests/tests.py      2011-03-30 
17:35:41 UTC (rev 15956)
+++ django/trunk/tests/regressiontests/csrf_tests/tests.py      2011-03-30 
17:35:50 UTC (rev 15957)
@@ -21,17 +21,12 @@
     return post_form_response()
 
 # Response/views used for template tag tests
-def _token_template():
-    return Template("{% csrf_token %}")
 
-def _render_csrf_token_template(req):
-    context = RequestContext(req, processors=[csrf])
-    template = _token_template()
-    return template.render(context)
-
 def token_view(request):
     """A view that uses {% csrf_token %}"""
-    return HttpResponse(_render_csrf_token_template(request))
+    context = RequestContext(request, processors=[csrf])
+    template = Template("{% csrf_token %}")
+    return HttpResponse(template.render(context))
 
 def non_token_view_using_request_processor(request):
     """

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to