Opened 2 years ago
Closed 2 years ago
#34757 closed New feature (fixed)
AsyncClient should follow redirects
| Reported by: | Mike Lissner | Owned by: | Olivier Tabone |
|---|---|---|---|
| Component: | Testing framework | Version: | 4.2 |
| Severity: | Normal | Keywords: | async |
| Cc: | Carlton Gibson, Andrew Godwin | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
In the documentation, it says the "AsyncClient has the same methods and signatures as the synchronous (normal) test client," except, "The follow parameter is not supported."
I searched Github and the tickets here, but couldn't find an explanation for this or a ticket discussing it. Is adding support for redirects something that's planned so that async tests of views that do redirects are possible?
Thanks as always for everything.
Change History (9)
comment:1 by , 2 years ago
| Cc: | added |
|---|---|
| Type: | Uncategorized → New feature |
comment:2 by , 2 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
Adding support for follow would required implementing an async version of _handle_redirects(). I'm not sure if it's possible.
I can't immediately see why not, so I'd say let's let someone have a pop at it. (The core loop fetching the chain of responses should work equivalently AFAICS, at a quick glance.)
comment:3 by , 2 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
I'll have a look at this one
comment:5 by , 2 years ago
| Patch needs improvement: | set |
|---|
comment:8 by , 2 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Adding support for
followwould required implementing an async version of _handle_redirects(). I'm not sure if it's possible.