Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Refs #2333 - Made minor formatting modifications to test framework do…

…cumentation.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f0362aa3005ce1b3f10e6d003f57c6dc8a89f9ff 1 parent cfe7794
Russell Keith-Magee authored

Showing 1 changed file with 23 additions and 27 deletions. Show diff stats Hide diff stats

  1. 50  docs/testing.txt
50  docs/testing.txt
@@ -267,37 +267,35 @@ The ``get()``, ``post()`` and ``login()`` methods all return a Response
267 267
 object. This Response object has the following properties that can be used 
268 268
 for testing purposes:
269 269
 
270  
-``status_code``
  270
+    ===============  ==========================================================
  271
+    Property         Description
  272
+    ===============  ==========================================================
  273
+    ``status_code``  The HTTP status of the response. See RFC2616_ for a 
  274
+                     full list of HTTP status codes.
271 275
 
272  
-    The HTTP status of the response. See RFC2616_ for a full list of HTTP status 
273  
-    codes.
  276
+    ``content``      The body of the response. The is the final page 
  277
+                     content as rendered by the view, or any error message 
  278
+                     (such as the URL for a 302 redirect).
274 279
 
275  
-    .. _RFC2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
  280
+    ``template``     The Template instance that was used to render the final 
  281
+                     content. Testing ``template.name`` can be particularly 
  282
+                     useful; if the template was loaded from a file, 
  283
+                     ``template.name`` will be the file name that was loaded. 
276 284
 
277  
-``content``
  285
+                     If multiple templates were rendered, (e.g., if one 
  286
+                     template includes another template),``template`` will 
  287
+                     be a list of Template objects, in the order in which 
  288
+                     they were rendered.
278 289
 
279  
-    The body of the response. The is the final page content as rendered by 
280  
-    the view, or any error message (such as the URL for a 302 redirect).
  290
+    ``context``      The Context that was used to render the template that 
  291
+                     produced the response content.
281 292
 
282  
-``template``
  293
+                     As with ``template``, if multiple templates were rendered 
  294
+                     ``context`` will be a list of Context objects, stored in 
  295
+                     the order in which they were rendered. 
  296
+    ===============  ==========================================================
283 297
 
284  
-    The Template instance that was used to render the final content. 
285  
-    Testing ``template.name`` can be particularly useful; if the 
286  
-    template was loaded from a file, ``name`` will be the file name that 
287  
-    was loaded. 
288  
-
289  
-    If multiple templates were rendered, (e.g., if one template includes 
290  
-    another template),``template`` will be a list of Template objects, in 
291  
-    the order in which they were rendered.
292  
-
293  
-``context``
294  
-
295  
-    The Context that was used to render the template that produced the 
296  
-    response content.
297  
-
298  
-    As with ``template``, if multiple templates were rendered ``context`` 
299  
-    will be a list of Context objects, stored in the order in which they 
300  
-    were rendered. 
  298
+.. _RFC2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
301 299
 
302 300
 The following is a simple unit test using the Test Client::
303 301
     
@@ -411,7 +409,6 @@ can call it anything you want. The only requirement is that it accept two
411 409
 arguments:
412 410
 
413 411
 ``run_tests(module_list, verbosity=1)``
414  
-
415 412
     The module list is the list of Python modules that contain the models to be
416 413
     tested. This is the same format returned by ``django.db.models.get_apps()``
417 414
 
@@ -430,7 +427,6 @@ a number of utility methods in the ``django.test.utils`` module.
430 427
     instrumentation of the template rendering system. 
431 428
 
432 429
 ``teardown_test_environment()``
433  
-
434 430
     Performs any global post-test teardown, such as removing the instrumentation 
435 431
     of the template rendering system. 
436 432
 

0 notes on commit f0362aa

Please sign in to comment.
Something went wrong with that request. Please try again.