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 Deferredresulting from the call tolisten, afterlistenhas been called. | 
| Instance Variable | factory | The factory passed to listen. | 
| Instance Variable | cancelException | The exception to errback self.resultwhen it is cancelled. | 
| Instance Variable | port | The IListeningPortwhichlisten'sDeferredwill 
fire with. | 
| Instance Variable | listenAttempts | The number of times listenhas been invoked. | 
| Instance Variable | failImmediately | If set, the exception to fail the Deferredreturned fromlistenbefore 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 listento
be invoked in order to fire theDeferredpreviously returned fromlisten. | 
| 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 Deferredstored inFakeServer.result | |
Test code should invoke this method after causing listen to
be invoked in order to fire the Deferred 
previously returned from listen.