HTTPretty is a HTTP client mock library for Python 100% inspired on ruby's FakeWeb.
HTTPretty is a HTTP client mock library for python 100% inspired on ruby's fakeweb.
HTTPretty monkey patches Python
's socket core module, re-implementing the HTTP
protocol, by mock
ing requests and responses. As for it works in this way, you don't need to worry what http library you're gonna use. HTTPretty
will mock the response for you :) (and also give you the latest requests so that you can check them).
This way even if the RESTful API server is down or its contains are changed, the expected reply can be mocked.
You should be using this tag if your question is related to the use of HTTPretty library or its API.