What is monkey patching?

No, it’s not like any of those things. It’s simply the dynamic replacement of attributes at runtime. For instance, consider a class that has a method get_data. This method does an external lookup (on a database or web API, for example), and various other methods in the class call it. However, in a unit test, … Read more