Summary
In this chapter, we learned different testing techniques and the value that tests add to the development cycle and production stability. We explored how to set up tests in DRF and write test cases for different scenarios. We learned how to use third-party packages such as factory_boy
to improve the developer experience of writing tests.
We saw a few best practices and recommendations to improve test cases in the development cycle. Postman as a tool can be very helpful in writing tests to monitor contracts; we learned how we can use Postman features to write integration tests for our APIs.
In Chapter 10, we will discuss the best practices/conventions that you can follow while developing applications in Django and DRF. Conventions and good practices are mostly subjective and come from years of experience in writing production-level code. I am also going to share my views and the lessons I have learned from working on different projects related to Django in the next chapter...