class SFTPTestProcess(protocol.ProcessProtocol): (source)
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 | clear |
Clear any buffered data received from stdout. Should be private. |
Method | err |
Called by Twisted when the cftp client prints data to stderr. |
Method | get |
Return the contents of the buffer of data received from stdout. |
Method | kill |
Kill the process if it is still running. |
Method | out |
Called by Twisted when the cftp client prints data to stdout. |
Method | process |
Called by Twisted when the cftp client process ends. |
Method | run |
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 | run |
Run each command in sequence and return a Deferred that fires when all commands are completed. |
Instance Variable | buffer |
Undocumented |
Instance Variable | on |
Undocumented |
Instance Variable | on |
Undocumented |
Method | _check |
Undocumented |
Instance Variable | _expecting |
Undocumented |
Instance Variable | _line |
Undocumented |
Instance Variable | _lines |
Undocumented |
Instance Variable | _process |
Undocumented |
Inherited from ProcessProtocol
:
Method | child |
Called when a file descriptor associated with the child process is closed. |
Method | child |
Called when data arrives from the child process. |
Method | err |
This will be called when stderr is closed. |
Method | in |
This will be called when stdin is closed. |
Method | out |
This will be called when stdout is closed. |
Method | process |
This will be called when the subprocess exits. |
Class Variable | transport |
Undocumented |
Inherited from BaseProtocol
(via ProcessProtocol
):
Method | connection |
Called when a connection is made. |
Method | make |
Make a connection to a transport and a server. |
Instance Variable | connected |
Undocumented |
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. |
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 | |
command | A 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. |
Run each command in sequence and return a Deferred that fires when all commands are completed.
Parameters | |
commands | A 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. |