1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #34757 -- Added support for following redirects to AsyncClient.

This commit is contained in:
Olivier Tabone
2023-08-04 09:14:19 +02:00
committed by Mariusz Felisiak
parent 1ac397674b
commit 3f8dbe267d
4 changed files with 252 additions and 12 deletions

View File

@@ -2032,7 +2032,6 @@ test client, with the following exceptions:
* In the initialization, arbitrary keyword arguments in ``defaults`` are added
directly into the ASGI scope.
* The ``follow`` parameter is not supported.
* Headers passed as ``extra`` keyword arguments should not have the ``HTTP_``
prefix required by the synchronous client (see :meth:`Client.get`). For
example, here is how to set an HTTP ``Accept`` header:
@@ -2046,6 +2045,10 @@ test client, with the following exceptions:
The ``headers`` parameter was added.
.. versionchanged:: 5.0
Support for the ``follow`` parameter was added to the ``AsyncClient``.
Using ``AsyncClient`` any method that makes a request must be awaited::
async def test_my_thing(self):