title: In Django, when should I use doctests instead of unit testing?
body: <p>From <a href="http://docs.djangoproject.com/en/dev/topics/testing/#writing-doctests" rel="nofollow">Django docs</a>:</p>
  
  <blockquote>
    <p>...the database is not refreshed between doctests, so if your doctest requires a certain state you should consider flushing the database or loading a fixture.</p>
  </blockquote>
  
  <p>Quite frankly, 90% of my testing is currently done in doctests. A colleague of mine thought that was peculiar. In all honesty, I do very little testing so I do not pretend to be a master of that field.</p>
  
  <p>Does anyone have a rule of thumb they use when deciding how to test?</p>
  
  <h2>Non-SO answer</h2>
  
  <p>A colleague of mine suggested to test model functions and constraints as doctests and views via unit tests. How does that sound for a rule of thumb?</p>