pythonunit-testinghttprestmocking

Mocking a HTTP server in Python


I'm writing a REST client and I need to mock a HTTP server in my tests. What would be the most appropriate library to do that? It would be great if I could create expected HTTP requests and compare them to actual.


Solution

  • Try HTTPretty, a HTTP client mock library for Python helps you focus on the client side.