In this chapter, we will take advantage of the non-blocking features combined with asynchronous operations in Tornado 5.1.1 in a new version of 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 do the following:
- Understand synchronous and asynchronous execution
- Work with asynchronous code
- Refactor code to take advantage of asynchronous decorators
- Map URL patterns to asynchronous and non-blocking request handlers
- Make HTTP requests to the Tornado non-blocking API
- Set up unit tests with pytest
- Write the first round of unit tests
- Run unit tests with pytest and check testing coverage
- Improve testing coverage
- Understand strategies for deploying Tornado APIs to the cloud