From bcc2befd0e9c1885e45b46d0b0bcdc11def8b249 Mon Sep 17 00:00:00 2001 From: Tom Carrick Date: Tue, 14 Jul 2020 13:32:24 +0200 Subject: Fixed #31789 -- Added a new headers interface to HttpResponse. --- tests/contenttypes_tests/test_views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/contenttypes_tests') diff --git a/tests/contenttypes_tests/test_views.py b/tests/contenttypes_tests/test_views.py index 4c654658ce..e54e5ff925 100644 --- a/tests/contenttypes_tests/test_views.py +++ b/tests/contenttypes_tests/test_views.py @@ -184,11 +184,11 @@ class ShortcutViewTests(TestCase): response = shortcut(self.request, user_ct.id, obj.id) self.assertEqual( 'http://%s/users/john/' % get_current_site(self.request).domain, - response._headers.get('location')[1] + response.headers.get('location') ) with self.modify_settings(INSTALLED_APPS={'remove': 'django.contrib.sites'}): response = shortcut(self.request, user_ct.id, obj.id) - self.assertEqual('http://Example.com/users/john/', response._headers.get('location')[1]) + self.assertEqual('http://Example.com/users/john/', response.headers.get('location')) def test_model_without_get_absolute_url(self): """The view returns 404 when Model.get_absolute_url() isn't defined.""" -- cgit v1.3