'RETR fails.'

def test_FailedRETR(self):

    f = protocol.Factory()
    f.noisy = 0
    port = reactor.listenTCP(0, f, interface='127.0.0.1')
    self.addCleanup(port.stopListening)
    portNum = port.getHost().port
    responses = ['220    ready,    dude    (vsFTPd    1.0.0:    beat    me,    break    me)', '331    Please    specify    the    password.', '230    Login    successful.    Have    fun.', '200    Binary    it    is,    then.', ('227    Entering    Passive    Mode    (127,0,0,1,%d,%d)' % ((portNum >> 8), (portNum & 255))), '550    Failed    to    open    file.']
    f.buildProtocol = (lambda addr: PrintLines(responses))
    cc = protocol.ClientCreator(reactor, ftp.FTPClient, passive=1)
    d = cc.connectTCP('127.0.0.1', portNum)
    def gotClient(client):
        p = protocol.Protocol()
        return client.retrieveFile('/file/that/doesnt/exist', p)
    d.addCallback(gotClient)
    return self.assertFailure(d, ftp.CommandFailed)
