1730451: Sample test case for a Tornado WS that asynchronously calls a third-party WS

Added 6 years ago by oddskool


1 Add your love!



Testing a Tornado WS which itself asynchronously calls another WS can be tricky. The following sample is a simple, minimal case for this.

The main trick is to force the test case to use the same IOLoop instance than the server so that the async fetch of the third-party ws is done using an already started IOLoop.

File: gen.engine async fetch testing