Package gofer :: Package rmi :: Module mock :: Class Method
[hide private]
[frames] | no frames]

Class Method

source code

Method wrapper.

Instance Methods [hide private]
 
__init__(self, method) source code
 
__call__(self, *args, **options) source code
 
push(self, method)
Push a function, exception to be evaluated on next call.
source code
callable
pop(self)
Pop the next method to be executed.
source code
 
purge(self)
Purge the call history.
source code
list
history(self)
Get the call history.
source code
 
__lock(self) source code
 
__unlock(self) source code
Instance Variables [hide private]
list __history
The call history
instancemethod __method
The (wrapped) method.
RLock __mutex
The object mutex
Method Details [hide private]

__init__(self, method)
(Constructor)

source code 
Parameters:
  • method (instancemethod) - A (wrapped) method.

push(self, method)

source code 

Push a function, exception to be evaluated on next call.

Parameters:
  • method (function/exception) - A function/exception

pop(self)

source code 

Pop the next method to be executed. It could be an exception in which case, it is raised.

Returns: callable
The next method.

history(self)

source code 

Get the call history.

Returns: list
A list of Call