diff options
| author | Illia Volochii <illia.volochii@gmail.com> | 2021-01-28 07:28:14 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2021-01-28 10:10:08 +0100 |
| commit | 3c004075b1d4fe4aa1ffc3f7d699dd9525bc6c02 (patch) | |
| tree | 00cfbc4e07ccd052a758be3714e4546b80ae1855 /tests/httpwrappers | |
| parent | 241da3f06ee0c6f436341cda5890b221ac453e3b (diff) | |
Fixed #32389 -- Fixed ResponseHeaders crash when data is not mapping.
Diffstat (limited to 'tests/httpwrappers')
| -rw-r--r-- | tests/httpwrappers/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py index cbf8b7d586..728e879b5c 100644 --- a/tests/httpwrappers/tests.py +++ b/tests/httpwrappers/tests.py @@ -835,6 +835,10 @@ class HttpResponseHeadersTestCase(SimpleTestCase): # del doesn't raise a KeyError on nonexistent headers. del response['X-Foo'] + def test_headers_as_iterable_of_tuple_pairs(self): + response = HttpResponse(headers=(('X-Foo', 'bar'),)) + self.assertEqual(response['X-Foo'], 'bar') + def test_headers_bytestring(self): response = HttpResponse() response['X-Foo'] = b'bar' |
