Right on.  I haven't gotten much into testing Django yet.  My previous
experience is with Rails (RSpec/Shoulda/Cucumber) and Java (JUnit).  I
plan on actually driving my app with TDD, but I was curious to know
which "way" most developers in the Django arena code their url
patterns (granted, I understand what you mean... if it's well tested,
then does it really matter which way it is designed?).

On Feb 4, 11:08 am, Phlip <phlip2...@gmail.com> wrote:
> David Parker wrote:
> >     verses = Verse.objects.filter(version__iexact=version,
> > book__iexact=book, chapter__iexact=chapter, verse__iexact=verse)
> >   else:
> >     logging.debug("chapter: " + chapter)
> >     logging.debug("verse  : " + verse)
> >     logging.debug("verse2 : " + verse2)
> > Now, is this the standard way of doing this kind of thing?  Or should
> > I break the method up into different methods and have several
> > different url patterns?  Thanks!
>
> Thou shalt write developer tests. ("Unit tests".)
>
> Each of your temporary debug statements should instead be permanent
> assert_equal() statements.
>
> Tested code is, perforce, highly decoupled, so that tests can easily
> reach any situation. So Test-Driven Development tends to obviate
> questions about design - the best design is the one that works under
> pressure from both test cases and the real application.
>
> --
>   Phlip
>  http://twitter.com/Pen_Bird

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to