On Wed, 2006-08-09 at 14:54 -0700, Eric Walstad wrote:
> On Wednesday 09 August 2006 13:46, Doug Van Horn wrote:
> > I've been kicking around Django for a few months now and the one thing
> > I've been trying to figure out is how to unit test my code.  
> ...
> > I'm 
> > struggling with how to test the views.  More to the point, I'm
> > wondering if testing views is worthwhile.
> 
> Hey Doug,
> 
> I've found that by testing our model methods we are covering most of the 
> problem spots pretty well.  We still find an occasional untested view bug, 
> however.  We make it a point to move most of the logic into the model classes 
> in an attempt to create a well-tested api that is used in our view code.
> 
> Still, I'd sure like to be able to test our view code and am interested to 
> hear what others have to say about it.

There's been quite a lot of discussion about this on the
django-developers list recently. Have a browse through [1] to see some
of the ideas. Russell Keith-Magee has also written a large number of
patches to try and get these ideas into the tree (see ticket #2333 for a
recent version of the changes). They are currently moving through the
system.

[1]
http://groups.google.com/group/django-developers/browse_frm/thread/edb0ddf964050179/3c27a8c2e60be923

In short, yes, testing views and templates is a good idea and we're
actively working on a solution to make this easier and testing-framework
agnostic.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to