October 2009
Beginner
407 pages
13h 29m
English
In order to facilitate the production of higher-quality code (and maintain the sanity of developers), Django comes equipped with an automated testing suite. Writing perfect code is next to impossible. It can be done, but there's a very good reason that computer keyboards have a "Backspace" key on them: people make mistakes. While a few developers probably like to think that they embody super-human qualities such as never writing faulty code, the simple truth is that we all make mistakes without realizing it at first.
In this chapter, we are going to take a look at the Django test suite and how you can use it to ensure that the code you've written for your web site is behaving the way you expected. We're going to write ...