diff options
| author | Illia Volochii <illia.volochii@gmail.com> | 2021-01-28 07:28:14 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2021-01-28 10:17:33 +0100 |
| commit | f9b2b1bb3bc4381752dd85a5f962202a0cc5cbb6 (patch) | |
| tree | 47a083885e479cbd2cf2dea19e8dbe3f8b05dbd5 /tests/httpwrappers/tests.py | |
| parent | e95a60bb64b2c78f025a44972e7d646fa8c85b2b (diff) | |
[3.2.x] Fixed #32389 -- Fixed ResponseHeaders crash when data is not mapping.
Backport of 3c004075b1d4fe4aa1ffc3f7d699dd9525bc6c02 from master
Diffstat (limited to 'tests/httpwrappers/tests.py')
| -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' |
