#27398: Make SimpleTestCase.assertRedirects() URL comparison ignore ordering of
query parameters
-------------------------------------+-------------------------------------
     Reporter:  Cédric Codet         |                    Owner:  Jan
         Type:                       |  Pieter Waagmeester
  Cleanup/optimization               |                   Status:  assigned
    Component:  Testing framework    |                  Version:  1.10
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Jan Pieter Waagmeester):

 I just pushed a commit allowing multiple values for a key in the
 `redirect_view` test view. Indeed this allows reordering `foo=1&foo=2` to
 `foo=2&foo=1` in `assertRedirects` without failures.

 There are currently no tests to test that.

 There is also
 
[https://github.com/django/django/blob/80e742d991b276023a3aa51a29ed757879051282/tests/auth_tests/test_views.py#L74-L89
 AuthViewTestCase.assertURLEqual()] which compares two `QueryDict` objects,
 which ensures order for multiple values is checked.

 We can move the `assertUrlRedirects` method to `SimpleTestCase` and use
 that method (or a similar implementation) to do the final url equality
 assertion in `SimpleTestCase.assertRedirects()`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/27398#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.1b139b9f3f34df63ed94e94d5b5e8f36%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to