def METHOD_NAME(self):
    # pass a socket object instead of an address tuple to FTPServer
    # constructor
    with contextlib.closing(socket.socket()) as sock:
        sock.bind((HOST, 0))
        sock.listen(5)
        ip, port = sock.getsockname()[:2]
        self.server = self.server_class(sock)
        self.server.start()
        self.client = self.client_class(timeout=GLOBAL_TIMEOUT)
        self.client.connect(ip, port)
        self.client.login(USER, PASSWD)