From 3f8dbe267d35f0219277f0fe2d79915a4fb2b045 Mon Sep 17 00:00:00 2001 From: Olivier Tabone Date: Fri, 4 Aug 2023 09:14:19 +0200 Subject: Fixed #34757 -- Added support for following redirects to AsyncClient. --- docs/releases/5.0.txt | 2 ++ docs/topics/testing/tools.txt | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt index 7379289e42..36c2c650fa 100644 --- a/docs/releases/5.0.txt +++ b/docs/releases/5.0.txt @@ -433,6 +433,8 @@ Tests :meth:`~django.test.Client.aforce_login`, and :meth:`~django.test.Client.alogout`. +* :class:`~django.test.AsyncClient` now supports the ``follow`` parameter. + URLs ~~~~ diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 2378ff4ec1..a9373ff108 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -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): -- cgit v1.3