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/conditional_processing | |
parent | 71ae1ab0123582cc5bfe0f7d5f4cc19a9412f396 (diff) | |
download | django-bcc2befd0e9c1885e45b46d0b0bcdc11def8b249.tar.gz |
Fixed #31789 -- Added a new headers interface to HttpResponse.
Diffstat (limited to 'tests/conditional_processing')
-rw-r--r-- | tests/conditional_processing/tests.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/conditional_processing/tests.py b/tests/conditional_processing/tests.py index 349b1cf7fe..4c7a32cba2 100644 --- a/tests/conditional_processing/tests.py +++ b/tests/conditional_processing/tests.py @@ -21,12 +21,12 @@ class ConditionalGet(SimpleTestCase): self.assertEqual(response.content, FULL_RESPONSE.encode()) if response.request['REQUEST_METHOD'] in ('GET', 'HEAD'): if check_last_modified: - self.assertEqual(response['Last-Modified'], LAST_MODIFIED_STR) + self.assertEqual(response.headers['Last-Modified'], LAST_MODIFIED_STR) if check_etag: - self.assertEqual(response['ETag'], ETAG) + self.assertEqual(response.headers['ETag'], ETAG) else: - self.assertNotIn('Last-Modified', response) - self.assertNotIn('ETag', response) + self.assertNotIn('Last-Modified', response.headers) + self.assertNotIn('ETag', response.headers) def assertNotModified(self, response): self.assertEqual(response.status_code, 304) |