'When client sends invalid HTTP method containing
non-ascii characters HTTP 400 \'Bad Request\' status will be returned.'

def test_invalidNonAsciiMethod(self):

    processed = []
    class MyRequest(http.Request, ):
        def process(self):
            processed.append(self)
            self.finish()
    badRequestLine = 'GE\xc2\xa9    /    HTTP/1.1\r\n\r\n'
    channel = self.runRequest(badRequestLine, MyRequest, 0)
    self.assertEqual(channel.transport.value(), 'HTTP/1.1    400    Bad    Request\r\n\r\n')
    self.assertTrue(channel.transport.disconnecting)
    self.assertEqual(processed, [])
