#34240: assertRedirects() doesn't preserve headers set in RequestFactory/Client
methods.
-----------------------------------+------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: dev
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Comment (by Mariusz Felisiak):
Replying to [comment:1 Carlton Gibson]:
> I think the regression test here isn't quite right. It fails at
b181cae2e3697b2e53b5b67ac67e59f3b05a6f0d (i.e. `67da22f0^`) and
`stable/4.1.x` too. 🤔
Support for `headers` was added in
67da22f08e05018ea968fcacbac9ac37ea925d85, so it's a bug in the new
feature. Previously, `headers` went to `**extra` and was not interpreted
as HTTP headers.
After 67da22f08e05018ea968fcacbac9ac37ea925d85 `headers={"redirect":
"val"}` should work the same as `HTTP_REDIRECT="val"` and is not in
`assertRedirects()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/34240#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701857c0c64e9-e5896dc8-5780-4015-89a8-9975df125fda-000000%40eu-central-1.amazonses.com.