2 Custom mocks for testing.
6 class MockParamCapture:
7 """ Mock that records the parameters with which a function was called
8 as well as the number of calls.
10 def __init__(self, retval=0):
12 self.return_value = retval
14 def __call__(self, *args, **kwargs):
17 self.last_kwargs = kwargs
18 return self.return_value