Mocking Python requests library
One of the toughest part of writing tests is how to go about handling dependencies on external dependencies. Aside from databases, probably the most common type of external dependency is a network request - usually HTTP (or HTTPS). requests is a very, very popular library for performing HTTP requests in Python. It’s popular because of its easy to use API...