Message354496
| 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 | <1570828167.49.0.553181497043.issue21478@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
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. #do_something() manager.set_foo_func(3) manager.set_bar_func(4) 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. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-10-11 21:09:27 | Caris Moses | set | recipients: + Caris Moses, cjw296, michael.foord, Claudiu.Popa, kushal.das, and, mariocj89, xtreak, iforapsy |
| 2019-10-11 21:09:27 | Caris Moses | set | messageid: <1570828167.49.0.553181497043.issue21478@roundup.psfhosted.org> |
| 2019-10-11 21:09:27 | Caris Moses | link | issue21478 messages |
| 2019-10-11 21:09:27 | Caris Moses | create | |