def test_chunkedEncoding(self):
        """
        If a request uses the I{chunked} transfer encoding, the request body is
        decoded accordingly before it is made available on the request.
        """
        httpRequest = b'''\
GET / HTTP/1.0
Content-Type: text/plain
Transfer-Encoding: chunked

6
Hello,
14
 spam,eggs spam spam
0

'''
        path = []
        method = []
        content = []
        decoder = []
        testcase = self
        class MyRequest(http.Request):
            def process(self):
                content.append(self.content.fileno())
                content.append(self.content.read())
                method.append(self.method)
                path.append(self.path)
                decoder.append(self.channel._transferDecoder)
                testcase.didRequest = True
                self.finish()

        self.runRequest(httpRequest, MyRequest)
        # The tempfile API used to create content returns an
        # instance of a different type depending on what platform
        # we're running on.  The point here is to verify that the
        # request body is in a file that's on the filesystem.
        # Having a fileno method that returns an int is a somewhat
        # close approximation of this. -exarkun
        self.assertIsInstance(content[0], int)
        self.assertEqual(content[1], b'Hello, spam,eggs spam spam')
        self.assertEqual(method, [b'GET'])
        self.assertEqual(path, [b'/'])
        self.assertEqual(decoder, [None])

        If a request uses the I{chunked} transfer encoding, the request body is
        decoded accordingly before it is made available on the request.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_http.py