Python Forum
unittest mock and patch - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: unittest mock and patch (/thread-22328.html)



unittest mock and patch - piscvau - Nov-08-2019

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.


RE: unittest mock and patch - ichabod801 - Nov-08-2019

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.