Fixed #17797 -- Enabled support for PATCH requests in the dummy test client. Thanks to pfarmer for the suggestion and initial patch.

This commit is contained in:
Julien Phalip 2013-02-02 18:22:40 -08:00
parent 08dc90bccf
commit 293f7a2114
3 changed files with 39 additions and 0 deletions

View file

@ -633,6 +633,14 @@ Use the ``django.test.client.Client`` class to make requests.
The ``follow`` and ``extra`` arguments act the same as for
:meth:`Client.get`.
.. method:: Client.patch(path, data='', content_type='application/octet-stream', follow=False, **extra)
Makes a PATCH request on the provided ``path`` and returns a
``Response`` object. Useful for testing RESTful interfaces.
The ``follow`` and ``extra`` arguments act the same as for
:meth:`Client.get`.
.. method:: Client.delete(path, data='', content_type='application/octet-stream', follow=False, **extra)
Makes an DELETE request on the provided ``path`` and returns a