Is it a view mix in?

It's a bit difficult to tell you much without more information.

A few you things that you may find useful or not for testing :

.  Test cases can override settings such as the urlconf
.  There's a test client to test views
.  Class based views can sometimes be tested without any of the former by
just testing the methods in them
.   You can always use mocking library
.  Tests are basically just python code with a lot of asserts, you can
always add viewed in them
.  You can use fixtures for test data if you see fit

Hope this helps!

Thomas
On Sep 10, 2012 5:23 PM, "Jonas Geiregat" <jo...@geiregat.org> wrote:

> Hello,
>
> I've created a simple reusable django package. This package basically
> consists out of a views.py file, with some helper functions.
>
> I want to write some tests for what's in this file. This file contains a
> mixin , so I probably can't test it directly.
>
> What's the best way to test a django package ?
>
> Do I need to include some kind of example project that, uses my mixin and
> has tests files just as one would test a normal django application ?
>
> I've tried googling but, there's little about this. Most of the things
> I've found where related to testing actual django applications.
>
> Any help is appreciated.
>
> Jonas
>
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
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