def test_multipartFileData(self):
        """
        If the request has a Content-Type of C{multipart/form-data},
        and the form data is parseable and contains files, the file
        portions will be added to the request's args.
        """
        processed = []
        class MyRequest(http.Request):
            def process(self):
                processed.append(self)
                self.write(b"done")
                self.finish()

        body = b"""-----------------------------738837029596785559389649595
Content-Disposition: form-data; name="uploadedfile"; filename="test"
Content-Type: application/octet-stream

abasdfg
-----------------------------738837029596785559389649595--
"""

        req = '''\
POST / HTTP/1.0
Content-Type: multipart/form-data; boundary=---------------------------738837029596785559389649595
Content-Length: ''' + str(len(body.replace(b"\n", b"\r\n"))) + '''


'''
        channel = self.runRequest(req.encode('ascii') + body, MyRequest,
                                  success=False)
        self.assertEqual(channel.transport.value(),
                         b"HTTP/1.0 200 OK\r\n\r\ndone")
        self.assertEqual(len(processed), 1)
        self.assertEqual(processed[0].args, {b"uploadedfile": [b"abasdfg"]})

        If the request has a Content-Type of C{multipart/form-data},
        and the form data is parseable and contains files, the file
        portions will be added to the request's args.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_http.py