Patching test dependencies via pytest fixture & unittest mock

from blog Redowan's Reflections, | ↗ original
↗ original
In Python, even though I adore writing tests in a functional manner via pytest, I still have a soft corner for the tools provided in the unittest.mock module. I like the fact it’s baked into the standard library and is quite flexible. Moreover, I’m yet to see another mock library in any other language or in the Python ecosystem that allows you to...