On Tuesday, June 5, 2012 10:12:45 AM UTC-4, dstufft wrote:
>
> On Tuesday, June 5, 2012 at 9:55 AM, Zach Mathew wrote:
>
> For example, I would avoid unit testing the "get_context_data" method on a 
> CBV and instead have a test that performs a request on the view and tests 
> the context variables.
>
> This is going to be slower than just unit testing get_context_data. 
>

That's a cost I'm willing to accept. The big advantage is that I could 
completely change the implementation of my view without having to rewrite 
my tests (ie. the tests are not implementation specific).

We might be getting sidetracked into a debate about testing methodologies, 
so let me reiterate that the general point I'm trying to make here is just 
that CBVs might be more suitable for a different style of 
programming/testing than the tdd top down/outside-in testing approach. And 
this might be the cause of some people's frustrations with it.
 

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

Reply via email to