Opened 18 years ago
Closed 18 years ago
#4968 closed (fixed)
assertRedirects doesn't respect query params
| Reported by: | 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)
Change History (5)
comment:1 by , 18 years ago
| Cc: | removed |
|---|---|
| Needs tests: | set |
| Owner: | changed from to |
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 18 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 , 18 years ago
| Needs tests: | unset |
|---|---|
| Triage Stage: | Accepted → Ready for checkin |
Looks good, Ivan
comment:4 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
This is oversight. Patch and test case welcome.