Requests Mock
Replace real HTTP requests with controlled examples during Python tests.
jamielennox · Code and testing
GitHub projectOpen source Open on GitHubHow to try it
In a Python virtual environment, install requests-mock==1.12.1. Register a sample garden endpoint and verify the quoted response and call count.
What we tested
1.12.1. Register a sample garden endpoint and verify the quoted response and call count. Matched exactly one fictional request and returned seven.