summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2022-08-22 18:20:15 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-08-25 07:24:25 +0200
commit6f49b7b69b4e19b0362d4dff35ef7544b94c84a5 (patch)
tree5aaef61d68209794323c396871c37c903e6953fd /docs
parent16fffc829cbcb231b7276d7e1d0bb836a515873b (diff)
Refs #18707 -- Corrected django.test.Client signature in docs.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/testing/tools.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt
index c2e844517a..3d7c2b1ebf 100644
--- a/docs/topics/testing/tools.txt
+++ b/docs/topics/testing/tools.txt
@@ -109,7 +109,7 @@ Making requests
Use the ``django.test.Client`` class to make requests.
-.. class:: Client(enforce_csrf_checks=False, json_encoder=DjangoJSONEncoder, **defaults)
+.. class:: Client(enforce_csrf_checks=False, raise_request_exception=True, json_encoder=DjangoJSONEncoder, **defaults)
It requires no arguments at time of construction. However, you can use
keyword arguments to specify some default headers. For example, this will
@@ -125,13 +125,13 @@ Use the ``django.test.Client`` class to make requests.
The ``enforce_csrf_checks`` argument can be used to test CSRF
protection (see above).
- The ``json_encoder`` argument allows setting a custom JSON encoder for
- the JSON serialization that's described in :meth:`post`.
-
The ``raise_request_exception`` argument allows controlling whether or not
exceptions raised during the request should also be raised in the test.
Defaults to ``True``.
+ The ``json_encoder`` argument allows setting a custom JSON encoder for
+ the JSON serialization that's described in :meth:`post`.
+
Once you have a ``Client`` instance, you can call any of the following
methods: