def test_headResponseContentLengthEntityHeader(self):
        """
        If a HEAD request is made, the I{Content-Length} header in the response
        is added to the response headers, not the connection control headers.
        """
        protocol = HTTPClientParser(
            Request(b'HEAD', b'/', _boringHeaders, None),
            lambda rest: None)
        protocol.makeConnection(StringTransport())
        protocol.dataReceived(b'HTTP/1.1 200 OK\r\n')
        protocol.dataReceived(b'Content-Length: 123\r\n')
        protocol.dataReceived(b'\r\n')
        self.assertEqual(
            protocol.response.headers,
            Headers({b'content-length': [b'123']}))
        self.assertEqual(
            protocol.connHeaders,
            Headers({}))
        self.assertEqual(protocol.response.length, 0)

        If a HEAD request is made, the I{Content-Length} header in the response
        is added to the response headers, not the connection control headers.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_newclient.py