twisted.application.test.test_internet.FakeServer(object) class documentationtwisted.application.test.test_internet
(View In Hierarchy)
Implements interfaces: twisted.internet.interfaces.IStreamServerEndpoint
In-memory implementation of IStreamServerEndpoint.
| Instance Variable | result | The Deferred
resulting from the call to listen, after listen
has been called. |
| Instance Variable | factory | The factory passed to listen. |
| Instance Variable | cancelException | The exception to errback self.result when it is cancelled. |
| Instance Variable | port | The IListeningPort
which listen's Deferred will
fire with. |
| Instance Variable | listenAttempts | The number of times listen has been invoked. |
| Instance Variable | failImmediately | If set, the exception to fail the Deferred
returned from listen before it is returned. |
| Method | __init__ | Undocumented |
| Method | listen | Return a Deferred and store it for future use. (Implementation of IStreamServerEndpoint). |
| Method | startedListening | Test code should invoke this method after causing listen to
be invoked in order to fire the Deferred
previously returned from listen. |
| Method | stoppedListening | No summary |
Deferred
returned from listen before it is returned.
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.