[TIP] testing-in-python Digest, Vol 50, Issue 10

Almad bugs at almad.net
Wed Mar 16 13:39:19 PDT 2011

2011/3/15 nyxtom at gmail.com <nyxtom at gmail.com>:
> With Django, there
> seems to be a tendency to exhaustively test views. This creates a scenario
> where your test integrates with context processors, middleware, database
> filters and probably a number of other items you may be unaware of. In
> short, if your test case isn't about integration or exhaustive acceptance,
> then mock out those areas that aren't required.

May I ask how is it done at Your place?

I end up basically unittesting underlying logic and testing views only
through integration tests (aside from some "unit project" magic, where
different-then-production settings are used).

Do You have any easy take on how to mock, for example database backend?

> - Thomas



More information about the testing-in-python mailing list