diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-10-07 09:23:40 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-10-07 09:23:40 +0000 |
| commit | cd8eeaacf53677044eb8022220ef5939a91228ae (patch) | |
| tree | 67808ebbdf8de780f7c2669c31bac7aff45bfa70 /docs/topics/testing.txt | |
| parent | 30b568226f86f268628ac40890a8fa40c4db0b97 (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/trunk@9188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics/testing.txt')
| -rw-r--r-- | docs/topics/testing.txt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt index 4f37b3bdc0..540900acf6 100644 --- a/docs/topics/testing.txt +++ b/docs/topics/testing.txt @@ -544,6 +544,36 @@ 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={}) + + .. versionadded:: development + + 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={}) + + .. versionadded:: development + + 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) + + .. versionadded:: development + + 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) + + .. versionadded:: development + + 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 |
