Hi Folks,

i recently wrote some small mixins that are intented to be attached to CBV 
like ListView, UpdateView, DetailView or even CreateView. The aim is to give 
users only access to their data. Their in terms of ownership. As an Example 
you have a Post model were a field called owner is a ForeignKey to 'auth.User' 
as a basic example.

So the mixin does filtering the queryset and passes an additional parameter to 
form classes where as an additional form Mixin then passes this down to the 
model. So far so good. (see http://pastebin.kde.org/pyzrouxfw)

Now my Question:

what would be the best solution to write a dedicated test against this mixin?
Would it be good or worth to create some Views loke the 4 above that inherits 
also the Mixin and then test against this as a complete behaviour? Or better 
mock it somehow differently? 

I really appreaciate your suggestions!!


-- 


Best Regards
 
Sven

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6286078.9jIiIkrESd%40gilgamesch.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to