mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Fixed #32790 -- Ensured test Client handles redirects to domain indexes without a specified trailing slash.
This commit is contained in:
parent
d54059ebce
commit
1e5aa8e1c7
4 changed files with 26 additions and 2 deletions
|
|
@ -762,6 +762,13 @@ class ClientTest(TestCase):
|
|||
response = self.client.get('/django_project_redirect/')
|
||||
self.assertRedirects(response, 'https://www.djangoproject.com/', fetch_redirect_response=False)
|
||||
|
||||
def test_external_redirect_without_trailing_slash(self):
|
||||
"""
|
||||
Client._handle_redirects() with an empty path.
|
||||
"""
|
||||
response = self.client.get('/no_trailing_slash_external_redirect/', follow=True)
|
||||
self.assertRedirects(response, 'https://testserver')
|
||||
|
||||
def test_external_redirect_with_fetch_error_msg(self):
|
||||
"""
|
||||
assertRedirects without fetch_redirect_response=False raises
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue