def test_multipartProcessingFailure(self):
        """
        When the multipart processing fails the client gets a 400 Bad Request.
        """
        # The parsing failure is having a UTF-8 boundary -- the spec
        # says it must be ASCII.
        req = b'''\
POST / HTTP/1.0
Content-Type: multipart/form-data; boundary=\xe2\x98\x83
Content-Length: 103

--\xe2\x98\x83
Content-Type: text/plain
Content-Length: 999999999999999999999999999999999999999999999999999999999999999
Content-Transfer-Encoding: quoted-printable

abasdfg
--\xe2\x98\x83--
'''
        channel = self.runRequest(req, http.Request, success=False)
        self.assertEqual(
            channel.transport.value(),
            b"HTTP/1.1 400 Bad Request\r\n\r\n")

        When the multipart processing fails the client gets a 400 Bad Request.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_http.py