'When the client sends the command C{PASV}, the server responds with a
host and port, and is listening on that port.'

def test_PASV(self):

    d = self._anonymousLogin()
    d.addCallback((lambda _: self.client.queueStringCommand('PASV')))
    def cb(responseLines):
        '\n                                                Extract    the    host    and    port    from    the    resonse,    and\n                                                verify    the    server    is    listening    of    the    port    it    claims    to    be.\n                                                '
        (host, port) = ftp.decodeHostPort(responseLines[(-1)][4:])
        self.assertEqual(port, self.serverProtocol.dtpPort.getHost().port)
    d.addCallback(cb)
    d.addCallback((lambda _: self.serverProtocol.transport.loseConnection()))
    return d
