Disable Network Requests When Running Pytest

Even though my team has been diligent with mocking external requests, a few web requests still managed to slip through after a few months of cranking out new features. We only noticed them when our tests started to fail . 🫣 The mocking problem Usually, when you write a test for code that makes network requests, you mock your HTTP library of choice, either by using the built-in unittest.mock…