summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-10-07 08:47:05 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-10-07 08:47:05 +0000
commited48b0b37ebbb7ec5a8001b7957bb5f9e021e644 (patch)
tree48397ebf8ac70f934e902a9633e9c5a9e3564fd0 /docs
parent66c77d03d2b7e9643a5d942591e7f77816d52fad (diff)
Fixed #5888 -- Added methods to the test client to support HEAD, PUT, DELETE
and OPTIONS support. Thanks Scott Barr and Leah Culver. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/testing.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
index 4f37b3bdc0..d7cbc272ac 100644
--- a/docs/topics/testing.txt
+++ b/docs/topics/testing.txt
@@ -544,6 +544,28 @@ arguments at time of construction:
Note that you should manually close the file after it has been provided
to ``post()``.
+ .. method:: Client.head(path, data={})
+
+ Makes a HEAD request on the provided ``path`` and returns a ``Response``
+ object. Useful for testing RESTful interfaces. Acts just like
+ :meth:`Client.get` except it does not return a message body.
+
+ .. method:: Client.options(path, data={})
+
+ Makes an OPTIONS request on the provided ``path`` and returns a
+ ``Response`` object. Useful for testing RESTful interfaces.
+
+ .. method:: Client.put(path, data={}, content_type=MULTIPART_CONTENT)
+
+ Makes an PUT request on the provided ``path`` and returns a
+ ``Response`` object. Useful for testing RESTful interfaces. Acts just
+ like :meth:`Client.put` except with the PUT request method.
+
+ .. method:: Client.delete(path)
+
+ Makes an DELETE request on the provided ``path`` and returns a
+ ``Response`` object. Useful for testing RESTful interfaces.
+
.. method:: Client.login(**credentials)
.. versionadded:: 1.0