To ensure the quality and correctness of your code, you should have automated software tests. Django provides tools for you to write test suites for your website. Test suites automatically check your website and its components to ensure that everything is working correctly. When you modify your code, you can run the tests to check whether your changes affected the application's behavior negatively.
The world of automated software testing has a wide range of divisions and terminologies. For the sake of this book, we will divide testing into the following categories:
- Unit testing refers to tests that are strictly targeted at individual pieces, or units, of code. Most commonly, a unit corresponds to a single file or module, and unit tests do their best to validate that the logic and behaviors are as expected.
- Integration testing goes one step further, dealing with...