-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Django 1.1 Testing and Debugging
In the previous chapter, we began learning about testing Django applications by writing some doctests for the Survey model. In the process, we experienced some of the advantages and disadvantages of doctests. When discussing some of the disadvantages, unit tests were mentioned as an alternative test approach that avoids some doctest pitfalls. In this chapter, we will start to learn about unit tests in detail. Specifically, we will:
Re-implement the Survey doctests as unit tests
Assess how the equivalent unit test version compares to the doctests in terms of ease of implementation and susceptibility to the doctest caveats discussed in the previous chapter
Begin learning some of the additional capabilities of unit tests as we extend the existing tests to cover additional functions
Change the font size
Change margin width
Change background colour