mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #27398 -- Added an assertion to compare URLs, ignoring the order of their query strings.
This commit is contained in:
committed by
Tim Graham
parent
4249076844
commit
24959e48d9
@@ -205,6 +205,12 @@ class ClientTest(TestCase):
|
||||
response = self.client.get('/redirect_view/', {'var': 'value'})
|
||||
self.assertRedirects(response, '/get_view/?var=value')
|
||||
|
||||
def test_redirect_with_query_ordering(self):
|
||||
"""assertRedirects() ignores the order of query string parameters."""
|
||||
response = self.client.get('/redirect_view/', {'var': 'value', 'foo': 'bar'})
|
||||
self.assertRedirects(response, '/get_view/?var=value&foo=bar')
|
||||
self.assertRedirects(response, '/get_view/?foo=bar&var=value')
|
||||
|
||||
def test_permanent_redirect(self):
|
||||
"GET a URL that redirects permanently elsewhere"
|
||||
response = self.client.get('/permanent_redirect_view/')
|
||||
|
||||
Reference in New Issue
Block a user