Package ldaptor :: Module testutil :: Class LDAPClientTestDriver
[hide private]
[frames] | no frames]

Class LDAPClientTestDriver

source code

A test driver that looks somewhat like a real LDAPClient.

Pass in a list of lists of LDAPProtocolResponses. For each sent LDAP message, the first item of said list is iterated through, and all the items are sent as responses to the callback. The sent LDAP messages are stored in self.sent, so you can assert that the sent messages are what they are supposed to be.

Instance Methods [hide private]
 
__init__(self, *responses) source code
 
send(self, op) source code
 
send_multiResponse(self, op, handler, *args, **kwargs) source code
 
send_noResponse(self, op) source code
 
_response(self) source code
 
assertNothingSent(self) source code
 
assertSent(self, *shouldBeSent) source code
 
connectionMade(self)
TCP connection has opened
source code
 
connectionLost(self, reason={0: <class ldaptor.protocols.ldap.ldaperrors.Success at 0x86f6...)
Called when TCP connection has been lost
source code
 
unbind(self) source code