Exemplo n.º 1
0
def test_common_delete_header():
    req_resp_base = RequestResponseBase(body=None,
                                        headers=(ContentLength(length=0),))
    req_resp_base.delete_header('Content-length')

    assert 'Content-length' not in req_resp_base._headers.keys()
Exemplo n.º 2
0
def test_common_decompress_when_header_removed():
    req_resp_base = RequestResponseBase(body='Test body\n',
                                        headers=(Compress(),))
    req_resp_base.delete_header('Compress')

    assert req_resp_base._compressed_body is None