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 Caris Moses
Recipients Caris Moses, Claudiu.Popa, and, cjw296, iforapsy, kushal.das, mariocj89, michael.foord, xtreak
Date 2019-10-11.21:09:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I tried it with mocked functions instead of methods and got the same result, so I dug into this a little deeper. It seems as though the issue it how the mocked functions are called. If I replace the do_something() line with the following then it works.


I am a beginner with unittest so please let me know if I am just using this incorrectly. However in the original code I posted, if I print(manager.set_foo_func.mock_calls, manager.set_bar_func.mock_calls) I get the calls made in do_something(), however print(manager.mock_calls) returns an empty list which leads me to believe something else is wrong.
Date User Action Args
2019-10-11 21:09:27Caris Mosessetrecipients: + Caris Moses, cjw296, michael.foord, Claudiu.Popa, kushal.das, and, mariocj89, xtreak, iforapsy
2019-10-11 21:09:27Caris Mosessetmessageid: <>
2019-10-11 21:09:27Caris Moseslinkissue21478 messages
2019-10-11 21:09:27Caris Mosescreate