Message259130
Unless i misunderstand the docs, i would expect `Mock(foo)` to have the same effect as `create_autospec(foo)`, but that doesn't appear to be the case:
>>> m1 = mock.Mock(spec=lambda: None)
>>> m2 = mock.create_autospec(spec=lambda: None)
>>> m1(1)
<Mock name='mock()' id='4377526960'>
>>> m2(1)
# snip
TypeError: too many positional arguments |
|
Date |
User |
Action |
Args |
2016-01-28 14:08:17 | davidszotten@gmail.com | set | recipients:
+ davidszotten@gmail.com |
2016-01-28 14:08:17 | davidszotten@gmail.com | set | messageid: <1453990097.49.0.0657857764216.issue26232@psf.upfronthosting.co.za> |
2016-01-28 14:08:17 | davidszotten@gmail.com | link | issue26232 messages |
2016-01-28 14:08:17 | davidszotten@gmail.com | create | |
|