class documentation
class StubSessionForStubAvatar: (source)
Known subclasses: twisted.conch.test.test_session.StubSessionForStubAvatarWithEnv
Implements interfaces: twisted.conch.interfaces.ISession
A stub ISession implementation for our StubAvatar. The instance variables generally keep track of method invocations so that we can test that the methods were called.
Method | __init__ |
Store the avatar we're adapting. |
Method | closed |
Note that close has been received. |
Method | eof |
Note that EOF has been received. |
Method | exec |
If the command is 'true', store the command, the process protocol, and the transport we connect to the process protocol. Otherwise, just store the command and raise an error. |
Method | get |
If the terminal is 'bad', fail. Otherwise, store the information in the ptyRequest variable. |
Method | open |
If we have gotten a shell request before, fail. Otherwise, store the process protocol in the shellProtocol variable, connect it to the EchoTransport and store that as shellTransport. |
Method | window |
If all the window sizes are 0, fail. Otherwise, store the size in the windowChange variable. |
Instance Variable | avatar |
the StubAvatar we are adapting. |
Instance Variable | exec |
if present, the command line passed to the execCommand method. |
Instance Variable | exec |
if present, the SSHSessionProcessProtocol passed to the execCommand method. |
Instance Variable | exec |
if present, the EchoTransport connected to execProtocol. |
Instance Variable | got |
if present, a closed message was received. |
Instance Variable | got |
if present, an EOF message was received. |
Instance Variable | pty |
if present, the terminal, window size, and modes passed to the getPty method. |
Instance Variable | shell |
if present, the SSHSessionProcessProtocol passed to the openShell method. |
Instance Variable | shell |
if present, the EchoTransport connected to shellProtocol. |
Instance Variable | window |
if present, the window size passed to the windowChangned method. |
If the command is 'true', store the command, the process protocol, and the transport we connect to the process protocol. Otherwise, just store the command and raise an error.
If we have gotten a shell request before, fail. Otherwise, store the process protocol in the shellProtocol variable, connect it to the EchoTransport and store that as shellTransport.