mocking: A showcase of different situations of mock.patch usage Installation Just run yam install Usage Just run yam tests. After finding the usage that best describes your usecase, you can inspect tests/test_exposed.py and see how the patching was done.