Mocking External APIs in Python with Unittest and Mock Module・Mock external APIs using unittest.mock module with patch decorator・Mock requests.post in the calling module, not in requests itself・Use side_effect attribute to raise exceptions or change return values dynamicallyミハウ2020.12.02pythonmocktestingunittestingapiapitestingmocking