summaryrefslogtreecommitdiff
path: root/docs/topics/testing/advanced.txt
diff options
context:
space:
mode:
authorDavid Wobrock <david.wobrock@gmail.com>2022-11-10 09:29:49 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-11-10 09:29:49 +0100
commit0931d5b087a37545af0bef597deac03b5f0f7db0 (patch)
treecb72c4f887e24e354ade7c9f788f3e2af872edf4 /docs/topics/testing/advanced.txt
parentd6fbfea08d9bae4165df6a0cfbd4520b5e2242b2 (diff)
Improved async request factory and client docs.
Diffstat (limited to 'docs/topics/testing/advanced.txt')
-rw-r--r--docs/topics/testing/advanced.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt
index cdcbc44437..2b2f35fdc3 100644
--- a/docs/topics/testing/advanced.txt
+++ b/docs/topics/testing/advanced.txt
@@ -70,6 +70,8 @@ The following is a unit test using the request factory::
AsyncRequestFactory
-------------------
+.. class:: AsyncRequestFactory
+
``RequestFactory`` creates WSGI-like requests. If you want to create ASGI-like
requests, including having a correct ASGI ``scope``, you can instead use
``django.test.AsyncRequestFactory``.
@@ -78,6 +80,9 @@ This class is directly API-compatible with ``RequestFactory``, with the only
difference being that it returns ``ASGIRequest`` instances rather than
``WSGIRequest`` instances. All of its methods are still synchronous callables.
+Arbitrary keyword arguments in ``defaults`` are added directly into the ASGI
+scope.
+
Testing class-based views
=========================