Tools for Testing in Django: Nose, Coverage and Factory Boy

In this post, you will learn how to install and use Nose, a tool for running your tests in Django.
You’ll learn how to run and configure Coverage, so that it reports only the packages and directories of interest.
And also, you’ll learn how to install and use Factory Boy in your tests (an alternative to Fixtures).

Read More!

Google+TwitterLinkedInFacebookReddit

Django testing: Doctests and Unittests

In this post, I introduce testing in Django and discuss the two common ways of performing tests: using Doctests and using the library unittest.

You’ll learn how to start writing your first test as well as the main differences between these two ways of testing.

Note: this post uses the old Test Suit, used in Django < 1.6. This is because I prefer how it discovers my test files. If you don’t like it… wait for a post on Nose, which will come soon 🙂
Read More!

Google+TwitterLinkedInFacebookReddit