@pytest.mark.parametrize(
        'headers', (example_request_headers, bytes_example_request_headers)
    )
    @pytest.mark.parametrize('cookie_header', unsecured_cookie_headers)
    def test_long_cookie_headers_can_be_indexed_push(self,
                                                     headers,
                                                     cookie_header,
                                                     frame_factory):
        # Regardless of what we send, we expect it to be never indexed.
        send_headers = headers + [cookie_header]
        expected_headers = headers + [
            HeaderTuple(cookie_header[0].lower(), cookie_header[1])
        ]

        c = h2.connection.H2Connection(client_side=False)
        c.receive_data(frame_factory.preamble())

        # We can use normal headers for the request.
        f = frame_factory.build_headers_frame(
            self.example_request_headers
        )
        c.receive_data(f.serialize())

        frame_factory.refresh_encoder()
        expected_frame = frame_factory.build_push_promise_frame(
            stream_id=1,
            promised_stream_id=2,
            headers=expected_headers,
            flags=['END_HEADERS'],
        )

        c.clear_outbound_data_buffer()
        c.push_stream(
            stream_id=1,
            promised_stream_id=2,
            request_headers=send_headers
        )

        assert c.data_to_send() == expected_frame.serialize()
Longer cookie headers can be indexed.
dataset/ETHPy150Open python-hyper/hyper-h2/test/test_header_indexing.py/TestSecureHeaders.test_long_cookie_headers_can_be_indexed_push