2

I'm trying to get caught up on unit testing, and I've looked over a few books - Debugging Django, Web Dev. with Django, and the official docs, but none seem to cover unit testing thoroughly enough for me. I'm also not an expert in Python web development, so maybe that's why.

What I'm looking for is something that starts at an intermediate level of python skill/knowledge and covers Django unit testing from scratch, with a few good real-world examples.

Any recommendations on such resources? Much appreciated.

5

3 Answers 3

7

Reading

Code

I'm sure you can find more on google/github/bitbucket/etc ...

Useful apps

djangopackages has quite some useful "testing tool" apps.

1
  • This does it. Thanks a bunch
    – George K.
    Feb 19, 2013 at 15:49
4

I've read quite a few Django books and Python books and you're right, none of them really gets the job done. The best material I have come across to date is Carl Meyer's Talk on Testing and Django.

3
  • Nice! That's the style/content I like to see. Thanks
    – George K.
    Feb 19, 2013 at 15:37
  • I don't think that Django unit tests documentation is done bad. For me it was easy to write Django tests when I moved from pure Python unit tests to Django unit tests. However my friend who didn't use before python unittests, couldn't get along with Django tests. So I think Django unittesting is documented well, but it doesn't cover basics behind unittesting, so it's confusing for people new to unit tests and TDD . Feb 19, 2013 at 15:42
  • Carl Meyer's talk is great, I'd really recommend it as per @super9
    – jvc26
    Feb 19, 2013 at 17:15
0

Did you try core developer Karen Tracy's book Django 1.1 Testing And Debugging? Although the title implies it's out of date, most of the advice is still applicable.

Not the answer you're looking for? Browse other questions tagged or ask your own question.