In this chapter, we will take advantage of the non-blocking features combined with asynchronous operations in Tornado in a new version for the API we built in the previous chapter. We will configure, write, and execute unit tests and learn a few things related to deployment. We will cover the following topics:
Understanding synchronous and asynchronous execution
Working with asynchronous code
Refactoring code to take advantage of asynchronous decorators
Mapping URL patterns to asynchronous and non-blocking request handlers
Making HTTP requests to the Tornado non-blocking API
Setting up unit tests
Writing a first round of unit tests
Running unit tests with
nose2
and checking testing coverageImproving testing coverage