From ed48b0b37ebbb7ec5a8001b7957bb5f9e021e644 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Tue, 7 Oct 2008 08:47:05 +0000 Subject: 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 --- docs/topics/testing.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'docs') 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 -- cgit v1.3