Fix remove_entity_headers helper function (#1415)
* Fix `remove_entity_headers` helper function * Add test for `remove_entity_headers` helper function
This commit is contained in:
committed by
Stephen Sadowski
parent
096c44b910
commit
f7adc5f84c
@@ -34,3 +34,41 @@ def test_is_hop_by_hop_header():
|
||||
)
|
||||
for header, expected in tests:
|
||||
assert helpers.is_hop_by_hop_header(header) is expected
|
||||
|
||||
|
||||
def test_remove_entity_headers():
|
||||
tests = (
|
||||
(
|
||||
{},
|
||||
{}
|
||||
),
|
||||
(
|
||||
{
|
||||
"Allow": "GET, POST, HEAD",
|
||||
},
|
||||
{}
|
||||
),
|
||||
(
|
||||
{
|
||||
"Content-Type": "application/json",
|
||||
"Expires": "Wed, 21 Oct 2015 07:28:00 GMT",
|
||||
"Foo": "Bar"
|
||||
},
|
||||
{
|
||||
"Expires": "Wed, 21 Oct 2015 07:28:00 GMT",
|
||||
"Foo": "Bar"
|
||||
},
|
||||
),
|
||||
(
|
||||
{
|
||||
"Allow": "GET, POST, HEAD",
|
||||
"Content-Location": "/test"
|
||||
},
|
||||
{
|
||||
"Content-Location": "/test"
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
for header, expected in tests:
|
||||
assert helpers.remove_entity_headers(header) == expected
|
||||
|
||||
Reference in New Issue
Block a user