Here are some files that will help you to understand better how do we use mock to improve our testing!
Hope it helps!
Here you will find an app.py and test.py. I made two simple functions that check if it's friday or not, each one have a way to test and the tests are already provided in the test.py.
Here you will find a simple challenge. An intern in a company somewhere made two functions to start a DDoS attack on a bank using an API.
This intern wants your help to make unit tests. But you can't change anything in the code or his manager will find out that he's cheating.
How do you unittest both functions?
Have fun!