def test_fileno_not_implemented(self): headers = HTTPHeaderMap([(':status', '200')]) resp = HTTP20Response(headers, DummyStream(b'')) with pytest.raises(NotImplementedError): resp.fileno()
def test_status_is_stripped_from_headers(self): headers = {':status': '200'} resp = HTTP20Response(headers, None) assert resp.status == 200 assert resp.getheaders() == []
def test_status_is_stripped_from_headers(self): headers = HTTPHeaderMap([(':status', '200')]) resp = HTTP20Response(headers, None) assert resp.status == 200 assert not resp.headers