def test_contentLengthAndTransferEncoding(self):
        """
        According to RFC 2616, section 4.4, point 3, if I{Content-Length} and
        I{Transfer-Encoding: chunked} are present, I{Content-Length} MUST be
        ignored
        """
        finished = []
        protocol = HTTPClientParser(
            Request(b'GET', b'/', _boringHeaders, None), finished.append)
        transport = StringTransport()
        protocol.makeConnection(transport)
        protocol.dataReceived(b'HTTP/1.1 200 OK\r\n')

        body = []
        protocol.response._bodyDataReceived = body.append

        protocol.dataReceived(
            b'Content-Length: 102\r\n'
            b'Transfer-Encoding: chunked\r\n'
            b'\r\n'
            b'3\r\n'
            b'abc\r\n'
            b'0\r\n'
            b'\r\n')

        self.assertEqual(body, [b'abc'])
        self.assertEqual(finished, [b''])

        According to RFC 2616, section 4.4, point 3, if I{Content-Length} and
        I{Transfer-Encoding: chunked} are present, I{Content-Length} MUST be
        ignored
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_newclient.py