def test_headersTooBigPerRequest(self):
        """
        Enforces total size of headers per individual request and counter
        is reset at the end of each request.
        """
        class SimpleRequest(http.Request):
            def process(self):
                self.finish()
        channel = http.HTTPChannel()
        channel.totalHeadersSize = 60
        channel.requestFactory = SimpleRequest
        httpRequest = (
            b'GET / HTTP/1.1\n'
            b'Some-Header: total-less-than-60\n'
            b'\n'
            b'GET / HTTP/1.1\n'
            b'Some-Header: less-than-60\n'
            b'\n'
            )

        channel = self.runRequest(
            httpRequest=httpRequest, channel=channel, success=False)

        self.assertEqual(
            channel.transport.value(),
            b'HTTP/1.1 200 OK\r\n'
            b'Transfer-Encoding: chunked\r\n'
            b'\r\n'
            b'0\r\n'
            b'\r\n'
            b'HTTP/1.1 200 OK\r\n'
            b'Transfer-Encoding: chunked\r\n'
            b'\r\n'
            b'0\r\n'
            b'\r\n'
            )

        Enforces total size of headers per individual request and counter
        is reset at the end of each request.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_http.py