class documentation

Protocol for testing cftp. Provides an interface between Python (where all the tests are) and the cftp client process (which does the work that is being tested).

Method __init__ No summary
Method clearBuffer Clear any buffered data received from stdout. Should be private.
Method errReceived Called by Twisted when the cftp client prints data to stderr.
Method getBuffer Return the contents of the buffer of data received from stdout.
Method killProcess Kill the process if it is still running.
Method outReceived Called by Twisted when the cftp client prints data to stdout.
Method processEnded Called by Twisted when the cftp client process ends.
Method runCommand Issue the given command via the cftp client. Return a Deferred that fires when the server returns a result. Note that the Deferred will callback even if the server returns some kind of error.
Method runScript Run each command in sequence and return a Deferred that fires when all commands are completed.
Instance Variable buffer Undocumented
Instance Variable onOutReceived Undocumented
Instance Variable onProcessEnd Undocumented
Method _checkForCommand Undocumented
Instance Variable _expectingCommand Undocumented
Instance Variable _lineBuffer Undocumented
Instance Variable _linesReceived Undocumented
Instance Variable _processEnded Undocumented

Inherited from ProcessProtocol:

Method childConnectionLost Called when a file descriptor associated with the child process is closed.
Method childDataReceived Called when data arrives from the child process.
Method errConnectionLost This will be called when stderr is closed.
Method inConnectionLost This will be called when stdin is closed.
Method outConnectionLost This will be called when stdout is closed.
Method processExited This will be called when the subprocess exits.
Class Variable transport Undocumented

Inherited from BaseProtocol (via ProcessProtocol):

Method connectionMade Called when a connection is made.
Method makeConnection Make a connection to a transport and a server.
Instance Variable connected Undocumented
def __init__(self, onOutReceived): (source)
Parameters
onOutReceivedA Deferred to be fired as soon as data is received from stdout.
def clearBuffer(self): (source)

Clear any buffered data received from stdout. Should be private.

def errReceived(self, data): (source)

Called by Twisted when the cftp client prints data to stderr.

def getBuffer(self): (source)

Return the contents of the buffer of data received from stdout.

def killProcess(self): (source)

Kill the process if it is still running.

If the process is still running, sends a KILL signal to the transport and returns a Deferred which fires when processEnded is called.

Returns
a Deferred.
def outReceived(self, data): (source)

Called by Twisted when the cftp client prints data to stdout.

def processEnded(self, reason): (source)

Called by Twisted when the cftp client process ends.

def runCommand(self, command): (source)

Issue the given command via the cftp client. Return a Deferred that fires when the server returns a result. Note that the Deferred will callback even if the server returns some kind of error.

Parameters
commandA string containing an sftp command.
Returns
A Deferred that fires when the sftp server returns a result. The payload is the server's response string.
def runScript(self, commands): (source)

Run each command in sequence and return a Deferred that fires when all commands are completed.

Parameters
commandsA list of strings containing sftp commands.
Returns
A Deferred that fires when all commands are completed. The payload is a list of response strings from the server, in the same order as the commands.

Undocumented

onOutReceived = (source)

Undocumented

onProcessEnd = (source)

Undocumented

def _checkForCommand(self): (source)

Undocumented

_expectingCommand = (source)

Undocumented

_lineBuffer = (source)

Undocumented

_linesReceived: list = (source)

Undocumented

_processEnded: bool = (source)

Undocumented