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 Petter S
Recipients Petter S, eamanu, xtreak
Date 2018-10-24.16:41:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Sure, consider the following code:

from unittest import mock

m = mock.Mock()
m(1, 3)
m("Test", data=[42])

When I call


I get the following error message:

AssertionError: Expected 'mock' to not have been called. Called 2 times.

This is what I would like to improve. On the other hand, if I call


I get the following error:

AssertionError: Calls not found.
Expected: ['', (3,), {}]
Actual: [call(1, 3), call('Test', data=[42])]

This is great and may serve as a template for what I want to introduce.
Date User Action Args
2018-10-24 16:41:40Petter Ssetrecipients: + Petter S, eamanu, xtreak
2018-10-24 16:41:40Petter Ssetmessageid: <>
2018-10-24 16:41:40Petter Slinkissue35047 messages
2018-10-24 16:41:40Petter Screate