Hello,<br><br>This is my first time using the python 
mock library and I&#39;m a little confused.  I&#39;d like to provide some 
guarantees that my mocks are being called with the correct number of 
arguments.  The documentation seems to indicate there are two ways to do
 this, &quot;spec&quot; and &quot;mocksignature&quot;, but it&#39;s a little unclear to me what 
the difference is supposed to be between them.<br>
<br>I find myself using the @patch.object decorator almost all the time,
 because the modules I&#39;m testing use a lot of top-level functions from 
modules they&#39;ve imported.  When I do something like this:<br><br>@patch.object(somemodule, &#39;somemethod&#39;, spec=True)<br>
<br>It doesn&#39;t seem to have any effect; I can call somemodule.somemethod
 with any combination of invalid arguments and no exceptions are 
thrown.  However, when I do:<br><br>@patch.object(somemodule, &#39;somemethod&#39;, mocksignature=True)<br>
<br>I get:<br><br>Traceback (most recent call last):<br>  File &quot;/usr/lib/python2.6/site-<div id=":57">packages/mock-0.7.0b3-py2.6.egg/mock.py&quot;, line 485, in patched<br>    arg = patching.__enter__()<br>  File &quot;/usr/lib/python2.6/site-packages/mock-0.7.0b3-py2.6.egg/mock.py&quot;, line 536, in __enter__<br>

    new_attr = mocksignature(original, new)<br>  File &quot;/usr/lib/python2.6/site-packages/mock-0.7.0b3-py2.6.egg/mock.py&quot;, line 140, in mocksignature<br>    signature, func = _getsignature(func, skipfirst)<br>  File &quot;/usr/lib/python2.6/site-packages/mock-0.7.0b3-py2.6.egg/mock.py&quot;, line 87, in _getsignature<br>

    func = func.__call__<br>AttributeError: &#39;SentinelObject&#39; object has no attribute &#39;__call__&#39;<br><br>What am I missing here?<br><br>Thanks for your help.</div>