'For the duration of this test, patch C{cftp}\'s C{fcntl} module to return
a fixed width and height.
@param width: the width in characters
@type width: L{int}
@param height: the height in characters
@type height: L{int}'

def setKnownConsoleSize(self, width, height):

    import tty
    class FakeFcntl(object, ):
        def ioctl(self, fd, opt, mutate):
            if (opt != tty.TIOCGWINSZ):
                self.fail('Only    window-size    queries    supported.')
            return struct.pack('4H', height, width, 0, 0)
    self.patch(cftp, 'fcntl', FakeFcntl())
