From 95b844915822daa41247ae56d2ccd5cf36c881e1 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 24 Aug 2023 10:31:52 +0200 Subject: [PATCH] Corrected AsyncRequestFactory's docstring. All AsyncRequestFactory methods are still synchronous callables. --- django/test/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/test/client.py b/django/test/client.py index a0e6c66e06..eed2d4f828 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -623,8 +623,8 @@ class AsyncRequestFactory(RequestFactory): testing. Usage: rf = AsyncRequestFactory() - get_request = await rf.get('/hello/') - post_request = await rf.post('/submit/', {'foo': 'bar'}) + get_request = rf.get("/hello/") + post_request = rf.post("/submit/", {"foo": "bar"}) Once you have a request object you can pass it to any view function, including synchronous ones. The reason we have a separate class here is: