mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
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:
parent
08dc90bccf
commit
293f7a2114
3 changed files with 39 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue