def test_messageReceivedError(self):
        """
        When a client with SSL enabled talks to a server without SSL, it
        should return a meaningful error.
        """
        svr = SecurableProto()
        okc = OKCert()
        svr.certFactory = lambda : okc
        box = amp.Box()
        box[b'_command'] = b'StartTLS'
        box[b'_ask'] = b'1'
        boxes = []
        svr.sendBox = boxes.append
        svr.makeConnection(StringTransport())
        svr.ampBoxReceived(box)
        self.assertEqual(boxes,
            [{b'_error_code': b'TLS_ERROR',
              b'_error': b'1',
              b'_error_description': b'TLS not available'}])

        When a client with SSL enabled talks to a server without SSL, it
        should return a meaningful error.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_amp.py