Message246988
assert_has_calls checks that the calls you specified were made. So if you specify an empty list it *should* pass (or be disallowed as it has no meaning).
If you want to check that these calls and *only* those calls were made you should use something like:
self.assertEqual(mock.mock_calls, [])
http://www.voidspace.org.uk/python/mock/mock.html#mock.Mock.assert_has_calls
Maybe a documentation improvement instead. |
|
Date |
User |
Action |
Args |
2015-07-20 13:20:09 | michael.foord | set | recipients:
+ michael.foord, rbcollins, berker.peksag, kushal.das |
2015-07-20 13:20:09 | michael.foord | set | messageid: <1437398409.65.0.844502867117.issue24653@psf.upfronthosting.co.za> |
2015-07-20 13:20:09 | michael.foord | link | issue24653 messages |
2015-07-20 13:20:09 | michael.foord | create | |
|