1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Corrected AsyncRequestFactory's docstring.

All AsyncRequestFactory methods are still synchronous callables.
This commit is contained in:
Mariusz Felisiak 2023-08-24 10:31:52 +02:00 committed by GitHub
parent 9942a3e49b
commit 95b8449158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: