This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author michael.foord
Recipients cjw296, michael.foord, ncoghlan, yselivanov
Date 2015-11-03.09:26:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446542818.33.0.693364093035.issue25532@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-11-03 09:26:58michael.foordsetrecipients: + michael.foord, ncoghlan, cjw296, yselivanov
2015-11-03 09:26:58michael.foordsetmessageid: <1446542818.33.0.693364093035.issue25532@psf.upfronthosting.co.za>
2015-11-03 09:26:58michael.foordlinkissue25532 messages
2015-11-03 09:26:58michael.foordcreate