Opened 17 years ago

Closed 17 years ago

#4968 closed (fixed)

assertRedirects doesn't respect query params

Reported by: Ivan Sagalaev <Maniac@…> Owned by: Russell Keith-Magee
Component: Testing framework Version: dev
Severity: Keywords:
Cc: 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

assertRedirects now parses out only a path from a redirect location and uses it to fetch a new response. Is there any reason why it leaves out query params? It doesn't work now for redirects like HttpResponseRedirect('?name=value')

The fix is simple but I wanted to check if it's by design.

Attachments (1)

4968.diff (5.0 KB ) - added by Ivan Sagalaev <Maniac@…> 17 years ago.
Patch

Download all attachments as: .zip

Change History (5)

comment:1 by Russell Keith-Magee, 17 years ago

Cc: russelm removed
Needs tests: set
Owner: changed from Adrian Holovaty to Russell Keith-Magee
Triage Stage: UnreviewedAccepted

This is oversight. Patch and test case welcome.

by Ivan Sagalaev <Maniac@…>, 17 years ago

Attachment: 4968.diff added

Patch

comment:2 by Ivan Sagalaev <Maniac@…>, 17 years ago

Has patch: set

Patch attached. One non-obvious point: I've replaced "urlparse" with "urlsplit" because the former splits an additional "parameter" part of a path which is not needed anyway.

comment:3 by Simon G. <dev@…>, 17 years ago

Needs tests: unset
Triage Stage: AcceptedReady for checkin

Looks good, Ivan

comment:4 by Russell Keith-Magee, 17 years ago

Resolution: fixed
Status: newclosed

(In [6031]) Fixed #4968 -- Added assertRedirects handling for paths with GET data. Thanks for the patch, Ivan Sagalaev.

Note: See TracTickets for help on using tickets.
Back to Top