Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21665 closed Cleanup/optimization (fixed)

assertRedirects should treat equivalent URLs differing only in URL-escaping as equal

Reported by: pdc Owned by: nobody
Component: Documentation Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

After upgrading to Django 1.6 I get this error message while testing:

AssertionError: Response redirected to 'http://testserver/front%3Bskip%3D47', expected 'http://testserver/front;skip=47'

Given that these both represent the same URL – don’t they? – I would have expected the assertRedirects predicate to be satisfied.

Change History (5)

comment:1 by Tim Graham, 11 years ago

Component: UncategorizedTesting framework

What version did you upgrade from? If you could identify the commit where the behavior changed, that will help us determine if this was an intentional change or a regression that should be fixed.

comment:2 by Aymeric Augustin, 11 years ago

This could be a consequence of #13260. See also #22223.

comment:3 by Aymeric Augustin, 11 years ago

Component: Testing frameworkDocumentation
Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

This particular consequence could be mentioned in the release notes but I think the code is now mostly correct.

comment:4 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 7af32bca38f01dc5b677a4161bf0853149f97b3e:

[1.6.x] Fixed #21665 -- Documented that changes in assertRedirects may be required given new URL escaping behavior.

Thank pdc for the report.

Backport of 62e81bc00b from master

comment:5 by Tim Graham <timograham@…>, 11 years ago

In 68a80166cd2a7e36d077a550468d382f443a079e:

[1.7.x] Fixed #21665 -- Documented that changes in assertRedirects may be required given new URL escaping behavior.

Thank pdc for the report.

Backport of 62e81bc00b from master

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