diff options
| author | David Wobrock <david.wobrock@gmail.com> | 2022-11-10 09:29:49 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-11-10 09:29:49 +0100 |
| commit | 0931d5b087a37545af0bef597deac03b5f0f7db0 (patch) | |
| tree | cb72c4f887e24e354ade7c9f788f3e2af872edf4 /docs/topics/testing/advanced.txt | |
| parent | d6fbfea08d9bae4165df6a0cfbd4520b5e2242b2 (diff) | |
Improved async request factory and client docs.
Diffstat (limited to 'docs/topics/testing/advanced.txt')
| -rw-r--r-- | docs/topics/testing/advanced.txt | 5 |
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 ========================= |
