Patching on setUp in Python's unittest

Patching on setUp in Python’s unittest One of my favorite programming languages is Python, and I think that tests should be a foundational part of software development, so it is not strange that I delve a lot in Python’s unittest. In this post we are going to show how to use unittest.mock.patch not in a decorator (the usual case) but in the setUp method. Why should you care about this? Well, I have not cared about this after more than a decade of working with python (intermittently), because I was just used to the patch decorator. [Read More]