'Enforces total size of headers per individual request and counter
is reset at the end of each request.'

def test_headersTooBigPerRequest(self):

    class SimpleRequest(http.Request, ):
        def process(self):
            self.finish()
    channel = http.HTTPChannel()
    channel.totalHeadersSize = 60
    channel.requestFactory = SimpleRequest
    httpRequest = 'GET    /    HTTP/1.1\nSome-Header:    total-less-than-60\n\nGET    /    HTTP/1.1\nSome-Header:    less-than-60\n\n'
    channel = self.runRequest(httpRequest=httpRequest, channel=channel, success=False)
    self.assertEqual(channel.transport.value(), 'HTTP/1.1    200    OK\r\nTransfer-Encoding:    chunked\r\n\r\n0\r\n\r\nHTTP/1.1    200    OK\r\nTransfer-Encoding:    chunked\r\n\r\n0\r\n\r\n')
