class documentation
class FakeServer: (source)
Implements interfaces: twisted.internet.interfaces.IStreamServerEndpoint
In-memory implementation of IStreamServerEndpoint
.
Method | __init__ |
Undocumented |
Method | listen |
Return a Deferred and store it for future use. (Implementation of IStreamServerEndpoint ). |
Method | started |
Test code should invoke this method after causing listen to be invoked in order to fire the Deferred previously returned from listen. |
Method | stopped |
Test code should invoke this method after causing stopListening to be invoked on the port fired from the Deferred returned from listen in order to cause the Deferred returned from stopListening to fire. |
Instance Variable | cancel |
The exception to errback self.result when it is cancelled. |
Instance Variable | factory |
The factory passed to listen. |
Instance Variable | fail |
If set, the exception to fail the Deferred returned from listen before it is returned. |
Instance Variable | listen |
The number of times listen has been invoked. |
Instance Variable | port |
The IListeningPort which listen's Deferred will fire with. |
Instance Variable | result |
The Deferred resulting from the call to listen, after listen has been called. |
Return a Deferred and store it for future use. (Implementation of IStreamServerEndpoint
).
Parameters | |
factory | the factory to listen with |
Returns | |
a Deferred stored in FakeServer.result |
Test code should invoke this method after causing listen to be invoked in order to fire the Deferred
previously returned from listen.