mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #21740 -- Stopped using mutable default arguments in test client
Thanks Denver Coneybeare for the report and initial patch, and Atala for another patch.
This commit is contained in:
parent
a6e3fb80b0
commit
2a31d00933
2 changed files with 12 additions and 12 deletions
|
@ -129,7 +129,7 @@ Use the ``django.test.Client`` class to make requests.
|
|||
Once you have a ``Client`` instance, you can call any of the following
|
||||
methods:
|
||||
|
||||
.. method:: Client.get(path, data={}, follow=False, secure=False, **extra)
|
||||
.. method:: Client.get(path, data=None, follow=False, secure=False, **extra)
|
||||
|
||||
.. versionadded:: 1.7
|
||||
|
||||
|
@ -192,7 +192,7 @@ Use the ``django.test.Client`` class to make requests.
|
|||
If you set ``secure`` to ``True`` the client will emulate an HTTPS
|
||||
request.
|
||||
|
||||
.. method:: Client.post(path, data={}, content_type=MULTIPART_CONTENT, follow=False, secure=False, **extra)
|
||||
.. method:: Client.post(path, data=None, content_type=MULTIPART_CONTENT, follow=False, secure=False, **extra)
|
||||
|
||||
Makes a POST request on the provided ``path`` and returns a
|
||||
``Response`` object, which is documented below.
|
||||
|
@ -269,7 +269,7 @@ Use the ``django.test.Client`` class to make requests.
|
|||
If you set ``secure`` to ``True`` the client will emulate an HTTPS
|
||||
request.
|
||||
|
||||
.. method:: Client.head(path, data={}, follow=False, secure=False, **extra)
|
||||
.. method:: Client.head(path, data=None, follow=False, secure=False, **extra)
|
||||
|
||||
Makes a HEAD request on the provided ``path`` and returns a
|
||||
``Response`` object. This method works just like :meth:`Client.get`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue