diff options
| author | Claude Paroz <claude@2xlibre.net> | 2015-03-13 23:40:14 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2015-03-18 18:22:50 +0100 |
| commit | a0c2eb46dd5a782c11c44f13c8efad2778be1641 (patch) | |
| tree | 699c83457e903200607ae550abaacbd74d33941f /tests/http_utils | |
| parent | 0339844b70895d6162b4595ae615e6edf843c6cd (diff) | |
Fixed #23960 -- Removed http.fix_location_header
Thanks Carl Meyer for the report and Tim Graham for the review.
Diffstat (limited to 'tests/http_utils')
| -rw-r--r-- | tests/http_utils/tests.py | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/tests/http_utils/tests.py b/tests/http_utils/tests.py index 2a2b29bbfb..a75cc7ab21 100644 --- a/tests/http_utils/tests.py +++ b/tests/http_utils/tests.py @@ -3,10 +3,8 @@ from __future__ import unicode_literals import gzip import io -from django.http import ( - HttpRequest, HttpResponse, HttpResponseRedirect, StreamingHttpResponse, -) -from django.http.utils import conditional_content_removal, fix_location_header +from django.http import HttpRequest, HttpResponse, StreamingHttpResponse +from django.http.utils import conditional_content_removal from django.test import TestCase @@ -71,15 +69,3 @@ class HttpUtilTests(TestCase): res = StreamingHttpResponse(['abc']) conditional_content_removal(req, res) self.assertEqual(b''.join(res), b'') - - def test_fix_location_without_get_host(self): - """ - Tests that you can return an absolute redirect when the request - host is not in ALLOWED_HOSTS. Issue #20472 - """ - request = HttpRequest() - - def bomb(): - self.assertTrue(False) - request.get_host = bomb - fix_location_header(request, HttpResponseRedirect('http://example.com')) |
