Overview
Syllabus
I present the key factors to use fake objects, and present some dangers.
Discuss some wanted characteristics in this kind of components.
Patching: how to do that and some common mistakes. After that I present patch scopes and some disadvantage in the use of this technique.
Inverse dependency as an possible alternative to patch
Mocks properties: return value, side effect and specs. Using mocks as spy functions or wrappers. Asserting on callings.
Using special libraries for mocking. Presenting pyvcr and moto."
Taught by
EuroPython Conference