Message253975
Have you read the docs for call? :-)
call.foo("foo") generates a call object representing a method call to the method foo. So you can do.
m = Mock()
m.foo("foo")
self.assertEqual(m.mock_calls, call.foo("foo"))
(etc)
See also the call.call_list (I believe) method for assertions on chained calls. |
|
Date |
User |
Action |
Args |
2015-11-03 09:26:58 | michael.foord | set | recipients:
+ michael.foord, ncoghlan, cjw296, yselivanov |
2015-11-03 09:26:58 | michael.foord | set | messageid: <1446542818.33.0.693364093035.issue25532@psf.upfronthosting.co.za> |
2015-11-03 09:26:58 | michael.foord | link | issue25532 messages |
2015-11-03 09:26:58 | michael.foord | create | |
|