'When a client with SSL enabled talks to a server without SSL, it
should return a meaningful error.'

def test_messageReceivedError(self):

    svr = SecurableProto()
    okc = OKCert()
    svr.certFactory = (lambda : okc)
    box = amp.Box()
    box['_command'] = 'StartTLS'
    box['_ask'] = '1'
    boxes = []
    svr.sendBox = boxes.append
    svr.makeConnection(StringTransport())
    svr.ampBoxReceived(box)
    self.assertEqual(boxes, [{'_error_code': 'TLS_ERROR', '_error': '1', '_error_description': 'TLS    not    available'}])
