Skip to content

Latest commit

 

History

History
39 lines (22 loc) · 898 Bytes

tornado.rst

File metadata and controls

39 lines (22 loc) · 898 Bytes

Tornado

HoverPy can be used to make virtualise asynchronous requests made from Tornado's AsyncHTTPClient.

Capturing traffic

../../../examples/tornado/svtornado.py

Making a request to our server now captures the requests.

curl http://localhost:8080

In fact you may notice your directory now contains a tornado.db.

Simulating traffic

We can how switch our server to simulate mode:

../../../examples/tornado/simtornado.py

Which means we are no longer hitting the real downstream dependency.

Modifying traffic

HoverPy can also be used to modify your requests, to introduce failures, or build tolerant readers

../../../examples/tornado/modtornado.py

This is our middleware:

../../../examples/tornado/middleware.py