mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #26428 -- Added support for relative path redirects in assertRedirects().
Thanks Trac alias master for the report and review.
This commit is contained in:
@@ -623,6 +623,14 @@ class ClientTest(TestCase):
|
||||
# Check some response details
|
||||
self.assertContains(response, 'This is a test')
|
||||
|
||||
def test_relative_redirect(self):
|
||||
response = self.client.get('/accounts/')
|
||||
self.assertRedirects(response, '/accounts/login/')
|
||||
|
||||
def test_relative_redirect_no_trailing_slash(self):
|
||||
response = self.client.get('/accounts/no_trailing_slash')
|
||||
self.assertRedirects(response, '/accounts/login/')
|
||||
|
||||
def test_mass_mail_sending(self):
|
||||
"Test that mass mail is redirected to a dummy outbox during test setup"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user