Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charettes/1d7f2ad25f7b5c56cc52e456d28b9b99 to your computer and use it in GitHub Desktop.
Save charettes/1d7f2ad25f7b5c56cc52e456d28b9b99 to your computer and use it in GitHub Desktop.
diff --git a/tests/test_client_regress/tests.py b/tests/test_client_regress/tests.py
index b8d7c99..8c67a18 100644
--- a/tests/test_client_regress/tests.py
+++ b/tests/test_client_regress/tests.py
@@ -467,6 +467,10 @@ class AssertRedirectsTests(SimpleTestCase):
self.assertEqual(response.request.get('wsgi.url_scheme'), 'https')
self.assertEqual(response.request.get('SERVER_NAME'), 'otherserver')
self.assertEqual(response.request.get('SERVER_PORT'), '8443')
+ response = self.client.get('/redirect_other_host/', follow=False)
+ self.assertRedirects(
+ response, 'https://otherserver:8443/no_template_view/', fetch_redirect_response=True
+ )
def test_redirect_chain_on_non_redirect_page(self):
"An assertion is raised if the original page couldn't be retrieved as expected"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment