summaryrefslogtreecommitdiff
path: root/docs/testing.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/testing.txt')
-rw-r--r--docs/testing.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/testing.txt b/docs/testing.txt
index 0b18545efb..bb091bfd6b 100644
--- a/docs/testing.txt
+++ b/docs/testing.txt
@@ -89,7 +89,7 @@ read Python's official documentation for the details.
For example, this function has a docstring that describes what it does::
def add_two(num):
- "Adds 2 to the given number and returns the result."
+ "Return the result of adding two to the provided number."
return num + 2
Because tests often make great documentation, putting tests directly in
@@ -600,8 +600,6 @@ Specifically, a ``Response`` object has the following attributes:
``context`` will be a list of ``Context``
objects, in the order in which they were rendered.
- ``headers`` The HTTP headers of the response. This is a dictionary.
-
``request`` The request data that stimulated the response.
``status_code`` The HTTP status of the response, as an integer. See
@@ -619,6 +617,10 @@ Specifically, a ``Response`` object has the following attributes:
which they were rendered.
=============== ==========================================================
+You can also use dictionary syntax on the response object to query the value
+of any settings in the HTTP headers. For example, you could determine the
+content type of a response using ``response['Content-Type']``.
+
.. _RFC2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
.. _template inheritance: ../templates/#template-inheritance