diff options
author | Tom Carrick <tom@carrick.eu> | 2020-07-14 13:32:24 +0200 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-09-14 08:41:59 +0200 |
commit | bcc2befd0e9c1885e45b46d0b0bcdc11def8b249 (patch) | |
tree | 59fab69a3182286da87fcd6fe05a8ce0f4277a5a /tests/decorators | |
parent | 71ae1ab0123582cc5bfe0f7d5f4cc19a9412f396 (diff) | |
download | django-bcc2befd0e9c1885e45b46d0b0bcdc11def8b249.tar.gz |
Fixed #31789 -- Added a new headers interface to HttpResponse.
Diffstat (limited to 'tests/decorators')
-rw-r--r-- | tests/decorators/tests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/decorators/tests.py b/tests/decorators/tests.py index 6f1f02b1af..5bb21661e3 100644 --- a/tests/decorators/tests.py +++ b/tests/decorators/tests.py @@ -438,7 +438,7 @@ class XFrameOptionsDecoratorsTests(TestCase): def a_view(request): return HttpResponse() r = a_view(HttpRequest()) - self.assertEqual(r['X-Frame-Options'], 'DENY') + self.assertEqual(r.headers['X-Frame-Options'], 'DENY') def test_sameorigin_decorator(self): """ @@ -449,7 +449,7 @@ class XFrameOptionsDecoratorsTests(TestCase): def a_view(request): return HttpResponse() r = a_view(HttpRequest()) - self.assertEqual(r['X-Frame-Options'], 'SAMEORIGIN') + self.assertEqual(r.headers['X-Frame-Options'], 'SAMEORIGIN') def test_exempt_decorator(self): """ @@ -477,6 +477,6 @@ class NeverCacheDecoratorTest(TestCase): return HttpResponse() r = a_view(HttpRequest()) self.assertEqual( - set(r['Cache-Control'].split(', ')), + set(r.headers['Cache-Control'].split(', ')), {'max-age=0', 'no-cache', 'no-store', 'must-revalidate', 'private'}, ) |