Python Forum

Full Version: unittest mock and patch
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello
I have been coding in python for about a year and I still have very much problem with unittest mock and patch framework. I do not know if this is the place to suggest some enhancements:
  • documentation is somewhat confusing,
  • passed the introductory level,there seems to be little knowledge available on the net about this subject,
  • the framework is very silent about errors encountered and this does not help but may be it cannot be more helpful.

For other people who have a hard time with it here, is 1 video I found very useful :
https://www.youtube.com/watch?v=ww1UsGZV8fQ
unfortunately it is short of deeper information about patch multiple, patch dict etc...
Also more complex subjects are not treated such as pitfalls in using new and new_callable, how to mok a class and its methods, ....
If anyone has any more link towards deep tutorial, I am interested.
We are not official Python people here, we are just enthusiasts trying to provide a different format for helping with coding problems. You may want to address your concerns to the Python mailing list.