Code

Changes between Version 3 and Version 4 of TestingGuide


Ignore:
Timestamp:
02/01/09 13:44:38 (5 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TestingGuide

    v3 v4  
    1 =Django Testing Guide= 
     1= Django Testing Guide = 
    22Testing web applications has historically been hard. It's even harder to write unit tests that work well when someone integrates your app. This guide aims to provide pointers and best practises for  
    33testing your apps and writing portable unit tests. 
    44 
     5== Writing portable tests == 
    56 
    6 ==test_urls== 
     7=== test_urls === 
    78Never use test_urls if your don't have a dedicated test template. Someone else may insert {% url %} tags in there (or template tags that do url reversing) causing your unit tests to fail. 
    89 
     10== Solving specific problems == 
    911 
    10 ==Testing view classes== 
     12=== Testing view classes === 
    1113Testing view classes through the test.client() can often require you to write lots of views that call the test class. It's often convenient to write a mapper view class that allows you to map a function to a temporary url.