Code

Opened 7 months ago

Closed 4 months ago

Last modified 4 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.

Attachments (0)

Change History (5)

comment:1 Changed 6 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 4 months ago by aaugustin

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

comment:3 Changed 4 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 4 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 4 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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.