Package lib :: Module mock :: Class MockCallable
[hide private]
[frames] | no frames]

Class MockCallable

source code

Intercepts the call and records it, then delegates to either the mock's dictionary of mock return values that was passed in to the constructor, or a handcrafted method of a Mock subclass.
Instance Methods [hide private]
 
__init__(self, name, mock, handcrafted=False) source code
 
__call__(self, *params, **kwparams) source code
 
recordCall(self, params, kwparams)
Record the MockCall in an ordered list of all calls, and an ordered list of calls for that method name.
source code
 
makeCall(self, params, kwparams) source code
 
checkExpectations(self, thisCall, params, kwparams) source code
Method Details [hide private]

__init__(self, name, mock, handcrafted=False)
(Constructor)

source code 

__call__(self, *params, **kwparams)
(Call operator)

source code 

recordCall(self, params, kwparams)

source code 
Record the MockCall in an ordered list of all calls, and an ordered list of calls for that method name.

makeCall(self, params, kwparams)

source code 

checkExpectations(self, thisCall, params, kwparams)

source code