#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: 1 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Carlton Gibson):
* needs_better_patch: 0 => 1 Comment: Hi Jan, Thanks for your effort here! I think the points you make in your last comment are all correct. The first step is adding the test cases to cover the `foo=1&foo=2` vs `foo=2&foo=1` example. These are indeed different URLs. You have `foo=1&bar=1` vs `bar=1&foo=1` already. Are there other examples we need to cover? Excepting the multi-value case, I don't see order being important. (Anyone?) I think your proposal to move and reuse `assertURLEqual()` method seems very sensible. (Going via `QueryDict` should be more reliable that trying to normalise the URL by-hand.) -- Ticket URL: <https://code.djangoproject.com/ticket/27398#comment:8> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.8973a1ec8fb970357d5e504124946dee%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.