'The test client will preserve scheme, host and port changes'

def test_redirect_to_different_host(self):

    response = self.client.get(u'/test_client_regress/redirect_other_host/', follow=True)
    self.assertRedirects(response, u'https://otherserver:8443/test_client_regress/no_template_view/', status_code=301, target_status_code=200)
    self.assertEqual(response.request.get(u'wsgi.url_scheme'), u'https')
    self.assertEqual(response.request.get(u'SERVER_NAME'), u'otherserver')
    self.assertEqual(response.request.get(u'SERVER_PORT'), u'8443')
