responsesEasy Playground

Mock the requests library for unit testing HTTP

Getting started with responsesRun locally
Install
pip install responses
Python CodeRun locally
Expected Output
# Expected output shown below
# (Run locally with: responses)

responses is a third-party package. Mock the requests library for unit testing HTTP. Install with: pip install responses

Challenge

Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?