summaryrefslogtreecommitdiff
path: root/tests/contenttypes_tests
diff options
context:
space:
mode:
authorTom Carrick <tom@carrick.eu>2020-07-14 13:32:24 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-09-14 08:41:59 +0200
commitbcc2befd0e9c1885e45b46d0b0bcdc11def8b249 (patch)
tree59fab69a3182286da87fcd6fe05a8ce0f4277a5a /tests/contenttypes_tests
parent71ae1ab0123582cc5bfe0f7d5f4cc19a9412f396 (diff)
Fixed #31789 -- Added a new headers interface to HttpResponse.
Diffstat (limited to 'tests/contenttypes_tests')
-rw-r--r--tests/contenttypes_tests/test_views.py4
1 files changed, 2 insertions, 2 deletions
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."""