Opened 21 months ago

Closed 18 months ago

Last modified 18 months 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 Changed 20 months ago by timo

  • Component changed from Uncategorized to Testing framework
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 Changed 18 months ago by aaugustin

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

comment:3 Changed 18 months ago by aaugustin

  • Component changed from Testing framework to Documentation
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Bug to Cleanup/optimization

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

comment:4 Changed 18 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

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 Changed 18 months ago by Tim Graham <timograham@…>

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