HoverPy can be used to make virtualise asynchronous requests made from Tornado's AsyncHTTPClient.
../../../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
.
We can how switch our server to simulate mode:
../../../examples/tornado/simtornado.py
Which means we are no longer hitting the real downstream dependency.
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