Exemplo n.º 1
0
def test_common_get_header_doesnt_exist():
    req_resp_base = RequestResponseBase()
    with pytest.raises(KeyError):
        req_resp_base.get_header('FakeHeader')
Exemplo n.º 2
0
def test_common_get_header():
    req_resp_base = RequestResponseBase()
    req_resp_base.add_header(ContentLength(length=0))

    assert isinstance(req_resp_base.get_header('Content-length'), ContentLength)