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.
--
Ticket URL: <https://code.djangoproject.com/ticket/34757>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Carlton Gibson, Andrew Godwin (added)
* type: Uncategorized => New feature
Comment:
Adding support for `follow` would required implementing an async version
of
[https://github.com/django/django/blob/24068058a63c506c300629fcc491601abc968926/django/test/client.py#L1170-L1177
_handle_redirects()]. I'm not sure if it's possible.
--
Ticket URL: <https://code.djangoproject.com/ticket/34757#comment:1>
* stage: Unreviewed => Accepted
Comment:
> 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.)
--
Ticket URL: <https://code.djangoproject.com/ticket/34757#comment:2>
* owner: nobody => Olivier Tabone
* status: new => assigned
Comment:
I'll have a look at this one
--
Ticket URL: <https://code.djangoproject.com/ticket/34757#comment:3>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/17168 PR]
Please review this PR
Cheers,
- Olivier
--
Ticket URL: <https://code.djangoproject.com/ticket/34757#comment:4>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/34757#comment:5>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"a9e0f3d3014461c2199123721899162c0876959d" a9e0f3d3]:
{{{
#!CommitTicketReference repository=""
revision="a9e0f3d3014461c2199123721899162c0876959d"
Refs #34757 -- Moved HTTP redirect logic to
django.test.client.ClientMixin.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34757#comment:6>
* needs_better_patch: 1 => 0
Comment:
PR updated
--
Ticket URL: <https://code.djangoproject.com/ticket/34757#comment:7>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/34757#comment:8>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"3f8dbe267d35f0219277f0fe2d79915a4fb2b045" 3f8dbe2]:
{{{
#!CommitTicketReference repository=""
revision="3f8dbe267d35f0219277f0fe2d79915a4fb2b045"
Fixed #34757 -- Added support for following redirects to AsyncClient.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34757#comment:9>